Author |
Message |
zeropoint
Joined: Mar 16, 2007 Posts: 19 Location: London, UK
|
|
Back to top
|
|
|
Kassen
Janitor
Joined: Jul 06, 2004 Posts: 7678 Location: The Hague, NL
G2 patch files: 3
|
Posted: Sat Mar 17, 2007 7:48 am Post subject:
|
|
|
Welcome, Zero point!
This looks like good fun, the Mononome and ChucK sound like a very nice match, can I ask you where you got this code?
So, let's get this straight. The problem arises because the monome is broadcasting certain MIDI data on a known channel and the faderfoxes are on a different channel? Or perhaps the problem is caused by the foxes sending cc's that aren't in the monome's specs?
I'm realy bussy today so I won't be able to solve this for you right now. It might also be tricky to pinpoint the exact problem without having a monome at hand or knowing what your foxes are sending but it should be possible to build in extra checks that prevent arrays from getting the numbers that are sending them out of bound.
That's what's going on here; a array is a sort of look-up-table. It takes one number as a input and returns another number, being the one that's at the location indicated by the input. Now, if you get a input that's larger then the length of this table then ChucK doesn't know what to do anymore and gives up.
This should be fixable but it'd help if you could indicate with as much presision as possible what data causes this exactly; that would help a lot. We might have to go a few times back and forth because I don't have a Monome to test with (though I'd love to!). There might be more then one problem of this sort.
It's nice to see ChucK used this way too. _________________ Kassen |
|
Back to top
|
|
|
zeropoint
Joined: Mar 16, 2007 Posts: 19 Location: London, UK
|
Posted: Sat Mar 17, 2007 6:25 pm Post subject:
|
|
|
Hi Kassen
thanks for getting back to me so quickly. ok so i'll try and give you as much info as possible.....
i have created two virtual midi ports using the iac bus on my mac that address the monome. i also have a firewire 410 that my two faderfoxes are connected to. if i run chuck probe i can see this :
[chuck]: ------( chuck -- 4 MIDI inputs )------
[chuck]: [0] : "IAC Driver in"
[chuck]: [1] : "IAC Driver out"
[chuck]: [2] : "Network Tim to Les"
[chuck]: [3] : "FireWire 410"
[chuck]:
[chuck]: ------( chuck -- 4 MIDI outputs )-----
[chuck]: [0] : "IAC Driver in"
[chuck]: [1] : "IAC Driver out"
[chuck]: [2] : "Network Tim to Les"
[chuck]: [3] : "FireWire 410"
the shred dies if i boot live with a set that is already premapped to the faderfoxes even if the 410 is not enabled in the preferences. the monome is mapped on midi channels 1 thru 8. the faderfoxes are mapped on channels 15 and 16. this is why i thought that to telling chuck to ignore channels 9 thru 16 might solve the problem.
the monogrid chuck code came from the applications section of the monome website at www.monome.org
if you need any further info please let me know.
thanks man |
|
Back to top
|
|
|
Kassen
Janitor
Joined: Jul 06, 2004 Posts: 7678 Location: The Hague, NL
G2 patch files: 3
|
Posted: Sun Mar 18, 2007 2:58 pm Post subject:
|
|
|
yeah, I get it, and the "grid" uses a 2d array (like the monome's matirx so that makes sense) and going over 8 channels makes it go out of range. That means there is some aray in there with a dimension that's 8 in size and indexed by the MIDI channel. I think I can fix that.
Yesterday I had a (chuck) gig so I was prepering then. Today is reserved for post-gig chilling since it was a bit insane so tomorow I should be able to fix this. _________________ Kassen |
|
Back to top
|
|
|
zeropoint
Joined: Mar 16, 2007 Posts: 19 Location: London, UK
|
Posted: Sun Mar 18, 2007 3:26 pm Post subject:
|
|
|
Thanks man......that's very kind of you
I tried reading the chuck documentation naively imaging I might have a go myself. I did manage to get the monome to wait for a midi event before coming online but that was as far as I got. I tried to find some sort of array definition in the monogrid code but couldn't see anything that resembled the documentation....way beyond me dude. Just thankful that there's folk like you out there!
out of interest......and forgive me my ignorance...how exactly to you perform live with chuck when it takes three lines of code to play a middle c?
oh and I like your description of your interests as "complex systems and simple pleasures"......quite einsteinian....metaphysical even. |
|
Back to top
|
|
|
Kassen
Janitor
Joined: Jul 06, 2004 Posts: 7678 Location: The Hague, NL
G2 patch files: 3
|
|
Back to top
|
|
|
zeropoint
Joined: Mar 16, 2007 Posts: 19 Location: London, UK
|
Posted: Mon Mar 19, 2007 5:24 am Post subject:
|
|
|
Thanks for doing that so quickly.....it's still killing the shred however as soon as I boot a set that is premapped to the foxes.
[chuck](VM): ArrayOutofBounds in shred[id=1:monogrid_139v2.ck], PC=[494], index=[12] |
|
Back to top
|
|
|
Kassen
Janitor
Joined: Jul 06, 2004 Posts: 7678 Location: The Hague, NL
G2 patch files: 3
|
Posted: Mon Mar 19, 2007 5:38 am Post subject:
|
|
|
Oops! And there I was mailing with Ahlstrom like we had it....
Back to the drawing board then.
Thanks for the extra info, so the culprit is some array that has a size below 12, I'll hunt for it, might be the grid's second dimention. _________________ Kassen |
|
Back to top
|
|
|
Kassen
Janitor
Joined: Jul 06, 2004 Posts: 7678 Location: The Hague, NL
G2 patch files: 3
|
|
Back to top
|
|
|
zeropoint
Joined: Mar 16, 2007 Posts: 19 Location: London, UK
|
Posted: Mon Mar 19, 2007 7:05 am Post subject:
|
|
|
Great! We're getting somewhere now. The shred remains in place with no array out of bounds......but now there is some midi feedback getting through to the monome which is causing the leds to light in the same specific pattern on booting a set.
Monogrid splits up the 8 x 8 grid on the monome as follows:
first line of eight buttons is used to switch between 8 grids of 7 x 8 buttons.
with your code adjustment the grid select buttons on the first row- 1,3,4 and 7 are lit.
1 and 3 are lit on the second row
3 and 7 on the third
3 on the fourth
3 and 7 on the fifth
3 and 7 on the 6th
3 on the 7th
3 on the 8th.
however as soon as I start and stop a clip mapped to those buttons (all on channel 1) the leds go out. in some cases though another different one lights up. Grids 2 through 8 which are assigned midi channels 2 - 8 remain unaffected.
I guess this is where it might get tricky with you not having the 40h in front of you, but i think there might be a virtual version available on the website. I'll check it out. again if any more detail from my end will help let me know. |
|
Back to top
|
|
|
zeropoint
Joined: Mar 16, 2007 Posts: 19 Location: London, UK
|
|
Back to top
|
|
|
zeropoint
Joined: Mar 16, 2007 Posts: 19 Location: London, UK
|
Posted: Mon Mar 19, 2007 7:47 am Post subject:
|
|
|
actually i just checked the other grids.....and although they are intact at start up as soon as i map a grid 2 button to a clip slot the same pattern of lights appear...... |
|
Back to top
|
|
|
Kassen
Janitor
Joined: Jul 06, 2004 Posts: 7678 Location: The Hague, NL
G2 patch files: 3
|
Posted: Mon Mar 19, 2007 9:37 am Post subject:
|
|
|
Hmmmm. If it's MIDI feedback that's involving the whole larger system of all of your ports and Live and whatever it is that's on the receiving end of the OSC stuff. Another matter is that I don't have MAX/MSP.
Realy the best thing would be to make ChucK ignore any MIDI message not aimed at it. Do you know what kind of message the monome is sending on those 8 channels? Is this just notes or also CC's? If it's just notes it would be possible to just filter anything that's not a note on those 8 channels out.
I'd also like to know what would happen if you'd try getting rid of your MIDI feedback loop. _________________ Kassen |
|
Back to top
|
|
|
Kassen
Janitor
Joined: Jul 06, 2004 Posts: 7678 Location: The Hague, NL
G2 patch files: 3
|
Posted: Mon Mar 19, 2007 9:48 am Post subject:
|
|
|
Wait!
I had another look, am I right in guessing that we can be sure the Monome is sending on channels 1 to 8? I thought for a while that it might be configured for other cahnnels and that this code would need to adapt. If we can be sure it's only channel 1 to 8 that would make it a bit more simple. _________________ Kassen |
|
Back to top
|
|
|
Kassen
Janitor
Joined: Jul 06, 2004 Posts: 7678 Location: The Hague, NL
G2 patch files: 3
|
|
Back to top
|
|
|
zeropoint
Joined: Mar 16, 2007 Posts: 19 Location: London, UK
|
Posted: Mon Mar 19, 2007 10:00 am Post subject:
|
|
|
ok so the note on note off are velocity triggers 127 for on and 0 for off....... |
|
Back to top
|
|
|
Kassen
Janitor
Joined: Jul 06, 2004 Posts: 7678 Location: The Hague, NL
G2 patch files: 3
|
Posted: Mon Mar 19, 2007 10:07 am Post subject:
|
|
|
zeropoint wrote: | ok so the note on note off are velocity triggers 127 for on and 0 for off....... |
Yeah, that's normal, a "note on" message that has a velocity of zero counts as a "note off". That's according to the MIDI specs and basically what everybody does. _________________ Kassen |
|
Back to top
|
|
|
zeropoint
Joined: Mar 16, 2007 Posts: 19 Location: London, UK
|
Posted: Mon Mar 19, 2007 10:15 am Post subject:
|
|
|
Kas you bloomin' genius! Yes!! That's done it.......everything working just fine now. I'll let Ahlstrom know what you've managed to do. If you are ever in London drop me a line and I'll buy you a beer or whatever floats your boat.
thank you so very much.
Tim |
|
Back to top
|
|
|
Kassen
Janitor
Joined: Jul 06, 2004 Posts: 7678 Location: The Hague, NL
G2 patch files: 3
|
Posted: Mon Mar 19, 2007 10:20 am Post subject:
|
|
|
I already notified Ahlstrom, he sounded quite happy that we were finding this little bug because it had eluded him so far, he should be aware of this topic.
I also left comments at my edit about what I'm doing and why so he should be able to clean things up and incorporate it all cleanly if he does a update.
So; cool! Thanks for your nice words and beers float my boat just fine, I'll be sure to drop you a line if I'm in London.
Cheers! _________________ Kassen |
|
Back to top
|
|
|
zeropoint
Joined: Mar 16, 2007 Posts: 19 Location: London, UK
|
Posted: Mon Mar 19, 2007 11:02 am Post subject:
|
|
|
i have noticed another slight bug. If I map a row of eight buttons to a row of clips in Live everythign works fine until I map a second row....then when i trigger a clip in that row one of the leds in the previous row lights and stays on.......any ideas or should i take this up with ahlstrom now? |
|
Back to top
|
|
|
zeropoint
Joined: Mar 16, 2007 Posts: 19 Location: London, UK
|
Posted: Mon Mar 19, 2007 11:05 am Post subject:
|
|
|
you know....i don't wnat to hassle you unduly when you haven't got one of these babies of your own and are unable to enjoy the fruits of your own labours ... |
|
Back to top
|
|
|
zeropoint
Joined: Mar 16, 2007 Posts: 19 Location: London, UK
|
Posted: Mon Mar 19, 2007 11:17 am Post subject:
|
|
|
no....it seems that was a red herring....caused by having one of live's clips set to legato.....for some reason that must be kicking something out to the monome. |
|
Back to top
|
|
|
Kassen
Janitor
Joined: Jul 06, 2004 Posts: 7678 Location: The Hague, NL
G2 patch files: 3
|
Posted: Mon Mar 19, 2007 11:27 am Post subject:
|
|
|
Great! End good all good.
It was a fun puzzle for me so we both got something out of it. If you ever feel inclined to do some ChucKing of your own do check back in.
Maybe I'll want a monome in the future as well, they are still going to build that larger one, right? You could play games on that, I think. _________________ Kassen |
|
Back to top
|
|
|
zeropoint
Joined: Mar 16, 2007 Posts: 19 Location: London, UK
|
Posted: Tue Mar 20, 2007 8:39 am Post subject:
|
|
|
Yeah....the next one is the 100h which will be a 16 x 16 grid....about 10 inches square which will mean the buttons are a little smaller. It will market for about $1200 - $1400.....which is a litle bit pricey...if I want sixteen steps I just map two rows....I'm really starting to fly with the comb of the foxes and the 40h - you still need knobs and faders in your set up imo....although I'd be intrigued to see what you get up to with your joystick.....phnarr, phnarr....well you know what i mean. Take it easy man and I'll definitely swing by again from time to time.
peace |
|
Back to top
|
|
|
|