TheTechnobear / Orac

Orac : virtual modular synth
GNU General Public License v3.0
355 stars 27 forks source link

orac 2.0: Note thru broken? #3

Closed giacecco closed 5 years ago

giacecco commented 5 years ago

Hi @TheTechnobear , thanks a lot for the incredible work you do on orac!

By chance I got my first Organelle only a few days ago, and I have been learning to use orac 2.0 directly, from the beta distribution you put on patchstorage.com. Since, I could not get basic Note thru to work.

In particular, I've been testing the following: with a clean copy of orac 2.0, I load basicpoly as module a1, and rhodey as a2. Then, in the routing module (s1), I set Note thru to on for module a1. I select a1 as the current module, and I expect the keyboard to play both synths, like it would do in orac 1.x... but it does not.

However, if I put arper as a1, basicpoly as a2, and rhodey as a3, Note thru works (?!?).

speculation follows, ignore if you have enough information already

I've never programmed Pure Data, but I've then compared the source PD for basicpoly in orac 1.x and in orac 2.0 to see if I could find something. I realised that in orac 1.x it looks like S-basicpoly has Note thru "hard coded ": a line goes from "r notesIn-$1" both into the "pd synth" (and then the outlet) and into "s notesOut-$1". But in orac 2.0 "r notesIn-$1" goes only into the synth!

Screenshot 2019-04-12 at 15 10 17

As a further test, I've then edited orac 2's basicpoly to draw the same line, and I got Note thru working in orac 2, too! (hard coded though, and mysteriously out of tune)

So my guess is that in orac 2 you either:

a) forgot to implement Note thru in all synths... that is unlikely, and why would it work with arper anyway?, or that

b) moved the Note thru functionality from the synths to the routing modules, and it is there that something is broken.

I've then checked the source for serial but my fledgling PD skills end there :-(

Thanks!

TheTechnobear commented 5 years ago

thank you very much for the detailed report - its really useful!

its actually something, I half remember spotting at some point - and then promptly forgot about it ;)

but yeah, its a bit of a tricky one....

I made it in 2.0 that modules do NOT pass audio or data thru, because if they do, then the router has no opportunity to 'get involved' (and thinks like bypass require this) - so (b)

BUT note-thru is what it says on the tin, its about passing notes thru from the previous module - but in this case there is no 'previous module'

I suspect I need to think of the correct use-case that fixes this, here its to do with the active module sending data thru , but Id also like to double check there is not an issue with chains , or that that this 'fix' would not have adverse side-effects.

giacecco commented 5 years ago

Ha! You mean it is not implemented yet then, I thought I was getting crazy :-) Though I still can't understand why putting arper first makes it work.

About the use case: the way I'd use Note thru is to build richer sounds from the combination of different synths playing the same note, and the combination of basicpoly and rhodey is actually a good example.

Intuitively, the way it would work is functionally identical as in orac 1.x, though implementing it with the router at the centre would mean getting the router to send in parallel the same note to all modules, starting from Dest or the active module in the active chain, down to the rightmost module in the active chain, as long as the Note thru chain is not broken. Moreover, different modulation may apply.

E.g. imagine I load a different synth in each of the first four serial slots and I set them like this.

a1 - synth 1, note thru off a2 - synth 2, note thru on a3 - synth 3, note thru on b1 - synth 4, note thru off

Then I play a note on:

1) a1 -> I only hear synth 1 with modulation m1 2) a2 -> I hear both synth 2 and 3 with modulation m1 and synth 4 with modulation m2 (cool!) 3) a3 -> I hear both synth 3 with modulation m1 and synth 4 with modulation m2 3) b4 -> I only hear synth 4

So, in case you were getting bored, I have just complicated your life further :-)

Thank you for all your work.

TheTechnobear commented 5 years ago

I know what the functional use-case is... i need to think about how I want to solve it,

though implementing it with the router at the centre would mean getting the router to send in parallel the same note to all modules, thats not correct at all

you misunderstand the issue... as i said, it's simply that there is no 'thru' on the first module, because the note is being sent directly to the module -its not coming THRU from the previous module. (all other thru functionality is fine)

modulation modules are completely separate, and have no affect on this.

what ever I do for the note bus, I will also do for the ctrl bus.

as per previous comment, my initial gut reaction is that its just simply an issue with the active module, basically if the active module has 'thru' enabled, then the message needs to go to the next module as well. BUT I need to check the code and test this hypothesis before I can say that that is the solution, and also consider other things (like how bypass may or may not affect this)

giacecco commented 5 years ago

One last note on this and then I'll stop bothering you on this subject :-)

(...) its just simply an issue with the active basically if the active module has 'thru' enabled, then the message needs to go to the next module as well

Yep, that is how I intuitively interpreted "Note thru" from the start. I've read it as "Pass the note to the next module", not, "Get the note from the previous module".

thats not correct at all

... and I understand why now. An example makes it clear: any of the modules may change the note itself, before it is handed over to the next module. This implies that every module must return its output note to the router before it is handed over to the next module, if Note thru is enabled. I can't think of another way to implement that.

The bypass case looks easy to me. Intuitively, "Note thru" - despite the wording - is a router behaviour, not a property of the module. So a module's "Note thru" should be executed whether the module is bypassed or not.

Of course I do not know orac well enough to consider the other complications you name. Good luck in picking the solution you need!