Closed kn0ll closed 12 years ago
Okay, this is very interesting. Will have a proper look when I get a moment and then we can work to get this merged. Cheers for all the work! Joe
Hey Nic,
Sorry for the delay - have been super busy. I have half an idea for this which I want to explore properly and see whether it could work. Basically I'd quite like to make this more generic so it can deal with messages in the wider sense, and then MIDI would work as a subset of this. So you would have nodes which send, receive and process (probably JSON) messages, and we could pass midi through the processing graph this way. So, from your example something like this would happen:
Then on top of this we could fairly simply allow AudioletGroups to connect to/from MessageNodes in the same way as AudioletNodes do currently, without the need for a separate MidiGroup concept.
I'll try to jot down some example code, but what do you think to the general idea? As I say - it's more a refinement of what you've got than anything else, but I think it could help when working with (for example) OSC messages, WebSocket applications etc.
Joe
yea that makes perfect sense. the role of the midi/osc/etc subclass, perhaps, would be routing a general message to a specific method? for instance:
midiOut.send({ channel: 144, key: 40, velocity: 255 }) -> midi.noteOn(40, 255);
oscOut.send({ value: 0.2, path: '/gain' }); -> osc['/gain'](0.2);
Merged into version-2 branch. Will work on expanding the messaging feature from there.
this is in reference to issue #38. i couldn't wait so i went ahead at a first pass. i hosted examples of the basic midi control and an arpeggiator. i hope the documentation/examples sufficiently explain the commit.
i did realize too late, that both instrument and arpeggiation control groups really only make sense with some frequency lookup, which would be made much easier with something like music.js. for now- the notes are all just relative frequencies with no math behind them.
so there's a few minor issues, but i figured i'd get your feedback before moving forward.
thanks!