Support

If you have a problem or need to report a bug please email : support@dsprobotics.com

There are 3 sections to this support area:

DOWNLOADS: access to product manuals, support files and drivers

HELP & INFORMATION: tutorials and example files for learning or finding pre-made modules for your projects

USER FORUMS: meet with other users and exchange ideas, you can also get help and assistance here

NEW REGISTRATIONS - please contact us if you wish to register on the forum

Users are reminded of the forum rules they sign up to which prohibits any activity that violates any laws including posting material covered by copyright

Mono to Poly and back?

For general discussion related FlowStone

Mono to Poly and back?

Postby Perfect Human Interface » Mon Aug 11, 2014 9:49 pm

Hey, why doesn't this pass audio?

mono poly mono.PNG
mono poly mono.PNG (10.91 KiB) Viewed 23802 times


MonoToPoly.PNG
MonoToPoly.PNG (35.82 KiB) Viewed 23802 times


I swear I was just starting to work with something that converted to Poly, did some stuff, and then back to mono, and it was passing audio but then all of a sudden it stopped. Now I can't get audio through these modules, even in new projects. :?
Perfect Human Interface
 
Posts: 643
Joined: Sun Mar 10, 2013 7:32 pm

Re: Mono to Poly and back?

Postby trogluddite » Mon Aug 11, 2014 11:01 pm

You need a poly output from a MIDI to Poly to make poly streams do anything at all - the channels in poly streams are switched on and off by the MtoP assigning and releasing the MIDI notes.

The mono to poly would usually be used if you have a common signal that you want to pass to every voice of a synth. For example. if you wanted to have an LFO that had the same phase for every voice, you could feed in a mono LFO using the mono to poly.

The voices don't have to come from a MIDI driver though - you could use the MIDI Event primitive or Ruby to create notes to feed into the MtoP if you need a way to control the turning on and off of voices.
All schematics/modules I post are free for all to use - but a credit is always polite!
Don't stagnate, mutate to create!
User avatar
trogluddite
 
Posts: 1730
Joined: Fri Oct 22, 2010 12:46 am
Location: Yorkshire, UK

Re: Mono to Poly and back?

Postby KG_is_back » Mon Aug 11, 2014 11:04 pm

Poly streams are created by midi to poly primitive. Mono stream has SSE channels running always (the initiate when FS is loaded, code is recompiled or when "clear audio primitive" receives trigger). Poly stream can have any number of channels (including none at all), but they are created and stopped by midi to poly primitive.

Mono to poly module is basically a hack. Mono stream is written into memory (by mono write), and in poly stream the value is read from the memory (by wave read primitive). However, when no poly channels are initiated, the value is still written by mono, but there is no poly to read it. Mono to poly module doesn't create new voices on it's own.

I have used this same way, to create chorus effect, with adjustable number of voices (basically a flanger in poly, with unique modulation parameters per poly channel/voice). Note that using green to create midi notes this way is inaccurate - if you connect multiple "midi event" prims with "afterload" prim, the actual notes will be created with slight delay form each other. This may be fixed using ruby I believe.
Attachments
How-poly-works.fsm
(9.39 KiB) Downloaded 1446 times
KG_is_back
 
Posts: 1196
Joined: Tue Oct 22, 2013 5:43 pm
Location: Slovakia

Re: Mono to Poly and back?

Postby trogluddite » Mon Aug 11, 2014 11:12 pm

KG_is_back wrote:I have used this same way, to create chorus effect, with adjustable number of voices

Very neat! :o
All schematics/modules I post are free for all to use - but a credit is always polite!
Don't stagnate, mutate to create!
User avatar
trogluddite
 
Posts: 1730
Joined: Fri Oct 22, 2010 12:46 am
Location: Yorkshire, UK

Re: Mono to Poly and back?

Postby Perfect Human Interface » Mon Aug 11, 2014 11:17 pm

Thanks again both of you. :)

I'm hoping to make a polyphonic, MIDI note-following filter (notch, bandpass) effect. So the filter cutoff is controlled by MIDI notes. That should be doable, right?
Perfect Human Interface
 
Posts: 643
Joined: Sun Mar 10, 2013 7:32 pm

Re: Mono to Poly and back?

Postby Perfect Human Interface » Mon Aug 11, 2014 11:26 pm

Oh, and if I need to find the pitch/frequency of the lowest note currently played, does that require using poly (or voices)?
Perfect Human Interface
 
Posts: 643
Joined: Sun Mar 10, 2013 7:32 pm

Re: Mono to Poly and back?

Postby KG_is_back » Tue Aug 12, 2014 12:14 am

You will have to do that with ruby. poly voices can not interact with each other, so it is complicated to find the "lowest pitched" one.

I do not know ruby, but I know that ruby can convert midi event to array of 4 integers (one for status byte, second for channel, rest two for parameter bytes - the same way as on midi event primitive). The thing will have to store midi notes in an array and output the pitch of the smallest one. It would add note on each midi note on event and remove on each midi off event.
KG_is_back
 
Posts: 1196
Joined: Tue Oct 22, 2013 5:43 pm
Location: Slovakia

Re: Mono to Poly and back?

Postby Perfect Human Interface » Tue Aug 12, 2014 12:48 am

So do modules like the Signal analyzer just add the data together if there's more than one stream on the input at a time?

You'd think you could do it in MIDI data before it even hits poly, but I don't see a way to do that with existing modules either.


Actually... There. That should do it. :D

MIDI split.PNG
MIDI split.PNG (38.52 KiB) Viewed 23778 times
Perfect Human Interface
 
Posts: 643
Joined: Sun Mar 10, 2013 7:32 pm

Re: Mono to Poly and back?

Postby KG_is_back » Tue Aug 12, 2014 1:51 am

Perfect Human Interface wrote:So do modules like the Signal analyzer just add the data together if there's more than one stream on the input at a time?


Yes, default behavior of all connectors is to sum all connectors that are connected (after conversion to the receivers format). That is true for floats, integers, their array versions, booleans and also all types of streams. Strings, texts and are appended (based on connector order) and triggers and midi are queued (based on connector order). For poly and mono4 values that are in the same channels/voices get added.

Signal analyzer is a completely different story though. It has it's own connector type (it is not really poly, although it is colored as poly). It basically creates a short buffer and uses connected stream to fill it in. It is as if it created a poly voice for certain amount of samples. However it seems to be not synced with running audio - the Signal Analyzer calculation is instantaneous -calculated all at once - not spliced into ASIO buffers as standard streams - you can even freeze FS by entering extremely big NS (that takes long to calculate). Basically it lets you use stream code as if it was green.
KG_is_back
 
Posts: 1196
Joined: Tue Oct 22, 2013 5:43 pm
Location: Slovakia

Re: Mono to Poly and back?

Postby Perfect Human Interface » Tue Aug 12, 2014 3:02 am

KG_is_back wrote:Signal analyzer is a completely different story though.


That's interesting.


So um... is there a better way? I'm getting scared.
aaaaaaa.PNG
aaaaaaa.PNG (82.72 KiB) Viewed 23773 times
Perfect Human Interface
 
Posts: 643
Joined: Sun Mar 10, 2013 7:32 pm

Next

Return to General

Who is online

Users browsing this forum: No registered users and 59 guests