Administrateur

  • Profile picture of warusfel
  • Profile picture of T.

Spat

Groupe Public active 1 week et 4 days ago

User group for Spat, panoramix, ToscA , and ADMix

Dump azimuth positions

Auteur 3 Utilisateurs souscrits |
Profile photo of NM
NM

Hello!
I’m still fairly new to spat. I’m using it within MAX7, and trying to use the Around bpatcher to change the speed of continuous circles for several sources at once using antescofo for event triggering.

I’m wondering how you can get spat.oper to dump only the azimuth positions. At the moment I can only get spat.oper to dump all the info about a source. But what I’d like is all the azimuth positions of every source, so I can send this data on to Around, so that when I make a speed change on Around, the source changes speed from its most recent position, rather than from a previous value of Init (e.g. the default 0 degrees).

I’ve attached an example patch which tries to sum up in a very crude way what I’m trying to do.

Any help would be much appreciated.

— Pasted Max Patch, click to expand. —
  • Ce sujet a été modifié 8 months et 4 weeks ago par Profile photo of NM NM.
  • Ce sujet a été modifié 8 months et 4 weeks ago par Profile photo of NM NM.
  • Ce sujet a été modifié 8 months et 4 weeks ago par Profile photo of NM NM.
Octobre 21, 2017 à 13:02 #24082
Profile photo of nadir B.
nadir B.

Hi

I for one think that you just need to address the speed change message to the circle bpatcher’s speed inlet…

As for the source azimut position :

– you can parse the source’s data with the route or select object from the first spat oper outlet
– you can use the multioutput attribute and parse the data from the source position output
– you can use the spat converter object connected to the first output of the spat oper and choose the az format
– Check the Spat Overview there must be plenty of other solutions…

And as you are using antescofo to control your spat, would you consider using this lib and tell us if it’s convenient ?

https://github.com/nadirB/Spat_Trajectory_Score_Library

Thanks for your feedback.

Bye

N.

Octobre 21, 2017 à 13:57 #24086
Profile photo of NM
NM

Hi,

Thanks, yes looking more closely at the Around bpatcher, I just have to disconnect the init value and replace it with my own value, sent via antescofo along with all the other initialisation data (see attached patch and antescofo score), so it’s not actually so necessary to have the positions dumped as previously described, at least not for this piece. But thank you for the tips on source azimut positions, this will be useful for other situations for sure.

Thanks also for the antescofo lib, it looks like exactly the kind of thing I’d like to explore once I’ve covered the basics (i.e. circles) with spat, before exploring more elaborate geometry, so when I get time to explore the lib I’ll try and give some feedback.

— Pasted Max Patch, click to expand. —

Thanks,
NM

Attachments:
  1. cues.txt
  2. cues.txt
Octobre 21, 2017 à 14:37 #24087
Profile photo of T.
T.

Hi,

here is a crude patch that should do what you want.
(just to put you on the track; i let you polish/optimize to your needs)

T.

— Pasted Max Patch, click to expand. —
Octobre 21, 2017 à 14:40 #24090
Profile photo of NM
NM

Hi,

Thanks a lot, your patch is precisely what I was after! I can tweak it further, as you say. But thanks again for your help!

Cheers,
NM

Octobre 21, 2017 à 15:01 #24091
Profile photo of NM
NM

Hello,

Follow up question to related to this post: How can I make spat.oper dump the azimuth positions in 0-360 degrees format instead of -180 to 180 degrees?

I am using the source azimuth position to trigger certain events that are defined within certain zones (e.g. when a musician is facing between 0-60 degrees, or 60-120 degrees etc), however to produce the [if] triggers on MAX I need to use only positive numbers 0-360 for the live source position as input data, but right now my spat.oper is outputting -1 to -180 when in the left half of the sound space.

Many thanks!
NM

Mars 30, 2018 à 19:16 #26089
Profile photo of nadir B.
nadir B.

Hi,

A scale object might do the trick.

Check the spat5.converter ?

N.

Mars 30, 2018 à 21:02 #26090
Profile photo of T.
T.

Hi,

Fairly simple: add 360 to the azimuth angle [+ 360.], then modulo [% 360.]

T.

Mars 30, 2018 à 21:25 #26091
Profile photo of NM
NM

Thanks for both your solutions. I also tried splitting the azimuth angle between:

[if $i1 >= 0 & $i1 <= 180 then $i1] and [if $f1 >= -180. & $f1 <= 0. then $f1] with [-180. 0 180 360]

But modulo is much more elegant!
NM

Mars 30, 2018 à 21:49 #26092

Vous devez être connecté pour répondre à ce sujet.

Log in now