[Csnd] wiimote instrument
Date | 2011-12-07 03:16 |
From | Kelly Hirai |
Subject | [Csnd] wiimote instrument |
i've been trying to make my code clearer, trying to learn about git, and trying to learn how to share code effectively, so i've spent some time recently cleaning up this wiimote instrument to share. this is a short arbitrary performance with it i made in the spring. the idea was to program chord changes from fake books and conduct melodies with the wii at a jam session. i have yet to attempt this. http://ongaku.isa-geek.net/~khirai/wii/wii_jazz_rec_for_bill2.mp3 the code is available here: git clone git://ongaku.isa-geek.net/~khirai/wii_jazz thanks for reading and listening. k. Send bugs reports to the Sourceforge bug tracker https://sourceforge.net/tracker/?group_id=81968&atid=564599 Discussions of bugs and features can be posted here To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound" |
Date | 2012-01-17 17:45 |
From | obaudouin |
Subject | [Csnd] Re: wiimote instrument |
Hello, I tried your code, the compilation is OK, but I get a wiimote connection error (see below). I also get the same error with other csd (wii opcodes). My question is: why I can't connect my wiimote (+ nunchuk) with my system, while other linux users can do that? Lot of mistakes with Linux tools as Cwiid, wminput, bluedevil. Thanks! --------------------------------- Wiiuse version 0.14 (compilation OK) Bluez without wiimote plugin Kernel without last wiimote module -- Linux fixe.lan 3.0.14-1.rt31.1.fc16.ccrma.x86_64.rt #1 SMP PREEMPT RT Thu Dec 22 09:51:53 PST 2011 x86_64 x86_64 x86_64 GNU/Linux -- [maestro@fixe wii_jazz]$ csound -+rtaudio=jack -o dac -m 0 -d wii_jazz2.orc wii-w1.sco -B 2000 PortAudio real-time audio module for Csound 0dBFS level = 32768.0 Csound version 5.15 (double samples) Jan 17 2012 libsndfile-1.0.25 orchname: wii_jazz2.orc graph init rtaudio: JACK module enabled orch compiler: instr 9 instr 10 internal message: strsav: buffer length now 1016 internal message: strsav: buffer length now 1016 instr 11 instr evinst instr 99 sorting score ... ... done Csound version 5.15 (double samples) Jan 17 2012 displays suppressed 0dBFS level = 32768.0 orch now loaded audio buffered in 256 sample-frame blocks writing 512 sample blks of 64-bit floats to dac SECTION 1: 55 elements in 2s3s.ftab wiiuse v0.14.0 loaded. Fork at http://github.com/rpavlik/wiiuse Original By: Michael Laforest |
Date | 2012-01-17 18:01 |
From | jpff@cs.bath.ac.uk |
Subject | Re: [Csnd] Re: wiimote instrument |
I have been using these opcodes with wiiuse v0.12 as fixed for ages. No problem at all. What does your orc say? Mine says i1 wiiconnect 10,1 ; One wii at present ;; Organ controls ;; 1) Amplitude wiirange $WII_NUNCHUK_PITCH., -50, -2, 0 ka wiidata $WII_NUNCHUK_PITCH., 0 FLsetVal ka-gk1, ka, gih1 .... an dthe score i10 0 300 More detail please. ==John ff > Hello, > > I tried your code, the compilation is OK, but I get a wiimote connection > error (see below). I also get the same error with other csd (wii opcodes). > > My question is: why I can't connect my wiimote (+ nunchuk) with my system, > while other linux users can do that? > > Lot of mistakes with Linux tools as Cwiid, wminput, bluedevil. > > Thanks! > > --------------------------------- > Wiiuse version 0.14 (compilation OK) > Bluez without wiimote plugin > Kernel without last wiimote module Send bugs reports to the Sourceforge bug tracker https://sourceforge.net/tracker/?group_id=81968&atid=564599 Discussions of bugs and features can be posted here To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound" |
Date | 2012-01-17 19:00 |
From | obaudouin |
Subject | [Csnd] Re: wiimote instrument |
I use this csd (and the result is displayed on my previous post): |
Date | 2012-01-17 20:02 |
From | Kelly Hirai |
Subject | Re: [Csnd] Re: wiimote instrument |
i'll check this when i get home, i haven't run this against the latest sources. does your fork of wiiuse change the enumeration of wii devices from beginning at 0 to beginning at 1? i would check to see if changing $WIIINIT(0) to $WIIINIT(1) and $WIIINSTR(0) to $WIIINSTR(1) fixes anything. i'll test later tonight if i can. k. On 01/17/2012 02:00 PM, obaudouin wrote: > I use this csd (and the result is displayed on my previous post): > > > > |
Date | 2012-01-17 21:42 |
From | obaudouin |
Subject | [Csnd] Re: wiimote instrument |
I tried with Wiiuse 0.12 (compilation OK + l.174 adding "memset(&addr, 0, sizeof addr);"). The wiimote seems recognized, but data can't be read. This problem is caused by Wiiuse, I think, not by Csound. With wiiuse-example, the nunchuk is never detected, and it is difficult to obtain a correct connexion with the Wiimote. That is pesky! ------------------------------------------------------------------------ STDOUT ------------------------------------------------------------------------ wiiuse v0.12 loaded. By: Michael Laforest |
Date | 2012-01-18 04:25 |
From | Kelly Hirai |
Subject | Re: [Csnd] Re: wiimote instrument |
i can not reproduce the wiiuse bug here using my rig consisting of: old wiimotes without motion plus belkin f87013xx1 usb bluetooth dongle sena ud100 bluetooth dongle these work fine, though the new parser chokes on wii_jazz2.orc ******************** * USING NEW PARSER * ******************** defining argument MOTE as...#0# defining argument MOTE as...#0# Too many file/macros i had trouble with another cheeper no name usb bluetooth radio which i eventually ditched. it would scan just fine but would fail to pair. i'm not sure it implemented all the features of the bluetooth protocol. i tested it with apple keyboard and mouse as well. it was very frustrating. k. On 01/17/2012 04:42 PM, obaudouin wrote: > I tried with Wiiuse 0.12 (compilation OK + l.174 adding "memset(&addr, 0, > sizeof addr);"). > > The wiimote seems recognized, but data can't be read. > > This problem is caused by Wiiuse, I think, not by Csound. > > With wiiuse-example, the nunchuk is never detected, and it is difficult to > obtain a correct connexion with the Wiimote. > > That is pesky! > > > ------------------------------------------------------------------------ > STDOUT > ------------------------------------------------------------------------ > wiiuse v0.12 loaded. > By: Michael Laforest |
Date | 2012-01-18 07:42 |
From | obaudouin |
Subject | [Csnd] Re: wiimote instrument |
Wiimote + Nunchuk: Nitendo RV-CNT-01 (with motion+) Bluetooth dongle: Cambridge Silicon Radio, Ltd ----- Olivier Baudouin, PhD http://olivierbaudouin.com MINT-OMF Paris-Sorbonne -- View this message in context: http://csound.1045644.n5.nabble.com/wiimote-instrument-tp5054313p5154060.html Sent from the Csound - General mailing list archive at Nabble.com. Send bugs reports to the Sourceforge bug tracker https://sourceforge.net/tracker/?group_id=81968&atid=564599 Discussions of bugs and features can be posted here To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound" |
Date | 2012-01-18 07:56 |
From | Francois PINOT |
Subject | Re: [Csnd] Re: wiimote instrument |
Hello Olivier, you can try this when compiling Wiiuse 0.12, it worked for me: add this line addr.l2_cid = 0; just after line 179, in the io_nix.c file of the wiiuse library. Then this field will be initialized with a zero value instead of a random value. Hope this helps. François. Le 17 janvier 2012 22:42, obaudouin <olivierbaudouin@gmail.com> a écrit : I tried with Wiiuse 0.12 (compilation OK + l.174 adding "memset(&addr, 0, |
Date | 2012-01-18 09:41 |
From | obaudouin |
Subject | [Csnd] Re: wiimote instrument |
*add this line addr.l2_cid = 0;* ---> it doesn't solve the problem... ----- Olivier Baudouin, PhD http://olivierbaudouin.com MINT-OMF Paris-Sorbonne -- View this message in context: http://csound.1045644.n5.nabble.com/wiimote-instrument-tp5054313p5154300.html Sent from the Csound - General mailing list archive at Nabble.com. Send bugs reports to the Sourceforge bug tracker https://sourceforge.net/tracker/?group_id=81968&atid=564599 Discussions of bugs and features can be posted here To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound" |
Date | 2012-01-18 10:06 |
From | Francois PINOT |
Subject | Re: [Csnd] Re: wiimote instrument |
On which OS are you working? 2012/1/18 obaudouin <olivierbaudouin@gmail.com> *add this line |
Date | 2012-01-18 10:08 |
From | obaudouin |
Subject | [Csnd] Re: wiimote instrument |
Fedora 16: Linux fixe.lan 3.0.14-1.rt31.1.fc16.ccrma.x86_64.rt #1 SMP PREEMPT RT Thu Dec 22 09:51:53 PST 2011 x86_64 x86_64 x86_64 GNU/Linux ----- Olivier Baudouin, PhD http://olivierbaudouin.com MINT-OMF Paris-Sorbonne -- View this message in context: http://csound.1045644.n5.nabble.com/wiimote-instrument-tp5054313p5154352.html Sent from the Csound - General mailing list archive at Nabble.com. Send bugs reports to the Sourceforge bug tracker https://sourceforge.net/tracker/?group_id=81968&atid=564599 Discussions of bugs and features can be posted here To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound" |
Date | 2012-01-18 10:15 |
From | Francois PINOT |
Subject | Re: [Csnd] Re: wiimote instrument |
I'm on linux too. I'll get my Wiimote + Nunchunk and have a try with your csd this afternoon. I'll let you know what's going on. François 2012/1/18 obaudouin <olivierbaudouin@gmail.com> Fedora 16: |
Date | 2012-01-18 14:13 |
From | Francois PINOT |
Subject | Re: [Csnd] Re: wiimote instrument |
Olivier, I've tested your csd on my system (Ubuntu 11.04, csound 5.15 built today from git, wwiuse v0.12) and I got the following output with one init error: PortAudio real-time audio module for Csound PortMIDI real time MIDI plugin for Csound virtual_keyboard real time MIDI plugin for Csound 0dBFS level = 32768.0 Csound version 5.15 (double samples) Jan 18 2012 libsndfile-1.0.23 Reading options from $HOME/.csoundrc UnifiedCSD: wii-ob.csd STARTING FILE Creating options Creating orchestra Creating score rtaudio: ALSA module enabled rtmidi: PortMIDI module enabled RAWWAVE_PATH: /usr/local/share/csound/rawwaves/ ******************** * USING NEW PARSER * ******************** Parsing successful! sorting score ... ... done Csound version 5.15 (double samples) Jan 18 2012 displays suppressed 0dBFS level = 32768.0 orch now loaded audio buffered in 500 sample-frame blocks writing 1000 sample blks of 64-bit floats to dac SECTION 1: wiiuse v0.12 loaded. By: Michael Laforest <thepara[at]gmail{dot}com> http://wiiuse.net http://wiiuse.sf.net [INFO] Found 1 bluetooth device(s). [INFO] Found wiimote (00:22:AA:8F:48:21) [id 1]. connect() output sock: L'h?te cible est arr?t? ou en panne INIT ERROR in instr 1: unable to open wiimote i1 wiiconnect 20 0 B 0.000 - note deleted. i1 had 1 init errors Score finished in csoundPerform(). inactive allocs returned to freespace end of score. overall amps: 0.0 0.0 overall samples out of range: 0 0 1 errors in performance 0 1000 sample blks of 64-bit floats written to dac I then changed the line i1 wiiconnect 20 to i1 wiiconnect 3, 1 and it worked fine. François Le 17 janvier 2012 20:00, obaudouin <olivierbaudouin@gmail.com> a écrit : I use this csd (and the result is displayed on my previous post): |
Date | 2012-01-18 17:15 |
From | Kelly Hirai |
Subject | Re: [Csnd] Re: wiimote instrument |
at line 174 adding memset(&addr, 0,sizeof addr); to wiiuse i
believe fixes this issue. On 01/18/12 09:13, Francois PINOT wrote: Olivier, |
Date | 2012-01-18 17:48 |
From | obaudouin |
Subject | [Csnd] Re: wiimote instrument |
Thank you François, it's better with a short time recognition. But wiiuse never detect the nunchuk (extension = 0 in wiuuse-example). ----- Olivier Baudouin, PhD http://olivierbaudouin.com MINT-OMF Paris-Sorbonne -- View this message in context: http://csound.1045644.n5.nabble.com/wiimote-instrument-tp5054313p5155456.html Sent from the Csound - General mailing list archive at Nabble.com. Send bugs reports to the Sourceforge bug tracker https://sourceforge.net/tracker/?group_id=81968&atid=564599 Discussions of bugs and features can be posted here To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound" |
Date | 2012-01-18 18:09 |
From | jpff@cs.bath.ac.uk |
Subject | Re: [Csnd] Re: wiimote instrument |
I got conflicting results. First attempt worked perfectly; subsequent failed after connect. I will check that I j=have the memset fix > Thank you François, it's better with a short time recognition. But wiiuse > never detect the nunchuk (extension = 0 in wiuuse-example). > > > > ----- > > Olivier Baudouin, PhD > http://olivierbaudouin.com > MINT-OMF > Paris-Sorbonne > > -- > View this message in context: > http://csound.1045644.n5.nabble.com/wiimote-instrument-tp5054313p5155456.html > Sent from the Csound - General mailing list archive at Nabble.com. > > > Send bugs reports to the Sourceforge bug tracker > https://sourceforge.net/tracker/?group_id=81968&atid=564599 > Discussions of bugs and features can be posted here > To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe > csound" > > > > Send bugs reports to the Sourceforge bug tracker https://sourceforge.net/tracker/?group_id=81968&atid=564599 Discussions of bugs and features can be posted here To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound" |
Date | 2012-01-18 19:29 |
From | jpff@cs.bath.ac.uk |
Subject | Re: [Csnd] Re: wiimote instrument |
If I reducx ethe timeout to 20 it runs as below iiuse v0.12 loaded. By: Michael Laforest |
Date | 2012-01-18 19:35 |
From | PINOT Francois |
Subject | Re: [Csnd] Re: wiimote instrument |
With the csd below, the nunchunk is correctly detected on my system: |
Date | 2012-01-18 19:59 |
From | Alex Weiss |
Subject | Re: [Csnd] Re: wiimote instrument |
Sorry to butt in, but this seems an appropriate place to ask this question: Do the wiimote opcodes work on OS X? And is there anything I need to consider when I buy a wiimote (are there different ones, for example)? I just looked them up on amazon, and they're a lot cheaper than I thought. And just thinking about the possibilities here makes me want to get one immediately... On Wed, Jan 18, 2012 at 11:35 AM, PINOT Francois <fggpinot@gmail.com> wrote: With the csd below, the nunchunk is correctly detected on my system: |
Date | 2012-01-18 20:04 |
From | jpff@cs.bath.ac.uk |
Subject | Re: [Csnd] Re: wiimote instrument |
wiimotes use bluetooth and so far I have not managed to understand the Apple bluetooth stack which differs from Linux and Windows. So I think the simple nswer is that it does not yet work and we need a mac-bluetooth wallah But they are a cheap interface.... ==John ff > Sorry to butt in, but this seems an appropriate place to ask this > question: > Do the wiimote opcodes work on OS X? And is there anything I need to > consider when I buy a wiimote (are there different ones, for example)? I > just looked them up on amazon, and they're a lot cheaper than I thought. > And just thinking about the possibilities here makes me want to get one > immediately... > > Send bugs reports to the Sourceforge bug tracker https://sourceforge.net/tracker/?group_id=81968&atid=564599 Discussions of bugs and features can be posted here To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound" |
Date | 2012-01-18 20:08 |
From | Alex Weiss |
Subject | Re: [Csnd] Re: wiimote instrument |
Oh :( Doesn't Apple provide a framework for bluetooth connectivity? On Wed, Jan 18, 2012 at 12:04 PM, <jpff@cs.bath.ac.uk> wrote: wiimotes use bluetooth and so far I have not managed to understand the |
Date | 2012-01-18 20:13 |
From | Kelly Hirai |
Subject | Re: [Csnd] Re: wiimote instrument |
i heard rumors you can get osc signals from it in mac using some
other software. you'd have to collect them using the osc opcodes in
csound. On 01/18/12 15:08, Alex Weiss wrote: Oh :( Doesn't Apple provide a framework for bluetooth connectivity? |
Date | 2012-01-18 20:15 |
From | Alex Weiss |
Subject | Re: [Csnd] Re: wiimote instrument |
Thanks. I'll see if I can find more info on that. Sounds like a latency-prone approach, though... On Wed, Jan 18, 2012 at 12:13 PM, Kelly Hirai <khirai@ongaku.isa-geek.net> wrote:
|
Date | 2012-01-18 20:15 |
From | Victor |
Subject | Re: [Csnd] Re: wiimote instrument |
I use a wiimote with osx all the time. You just need a wiimote to osc client program and then osc in csound.
|
Date | 2012-01-18 20:17 |
From | Alex Weiss |
Subject | Re: [Csnd] Re: wiimote instrument |
Great news, thanks. Did you ever have issues with latency? On Wed, Jan 18, 2012 at 12:15 PM, Victor <Victor.Lazzarini@nuim.ie> wrote:
|
Date | 2012-01-18 20:18 |
From | Victor |
Subject | Re: [Csnd] Re: wiimote instrument |
There is no latency problem with this.
|
Date | 2012-01-18 20:22 |
From | Alex Weiss |
Subject | Re: [Csnd] Re: wiimote instrument |
Great! Last question: Do I need to get a wiimote or a wiimote plus? On Wed, Jan 18, 2012 at 12:18 PM, Victor <Victor.Lazzarini@nuim.ie> wrote:
|
Date | 2012-01-18 20:30 |
From | Tito Latini |
Subject | Re: [Csnd] Re: wiimote instrument |
Attachments | None |
Date | 2012-01-18 20:42 |
From | Victor |
Subject | Re: [Csnd] Re: wiimote instrument |
Both should work, but i only have a standard wiimote.
|
Date | 2012-01-18 20:45 |
From | jpff@cs.bath.ac.uk |
Subject | Re: [Csnd] Re: wiimote instrument |
This change will/may confuse the diagnostics. 63 is magic, so I think I need to think of a better plan. Did not reaise that peopl eused so many macros Give me some time. ==John ff >> these work fine, though the new parser chokes on wii_jazz2.orc >> ******************** >> * USING NEW PARSER * >> ******************** >> defining argument MOTE as...#0# >> defining argument MOTE as...#0# >> Too many file/macros > > I don't have a wii to try but I can help Kelly with > 'Too many file/macros' error. It's a problem with > diagnostics (git), but you know the code and here > is a dirty trick: > > Engine/csound_orc_compile.c:1873 > > replace > > if (n=63) ... > > with > > if (n=63) free(filedir[--n]); > > It's provisional but so you can try wii_jazz2.orc (I hope) > > tito > > > Send bugs reports to the Sourceforge bug tracker > https://sourceforge.net/tracker/?group_id=81968&atid=564599 > Discussions of bugs and features can be posted here > To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe > csound" > > > > Send bugs reports to the Sourceforge bug tracker https://sourceforge.net/tracker/?group_id=81968&atid=564599 Discussions of bugs and features can be posted here To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound" |
Date | 2012-01-18 20:49 |
From | Tito Latini |
Subject | Re: [Csnd] Re: wiimote instrument |
Attachments | None |
Date | 2012-01-18 21:30 |
From | Kelly Hirai |
Subject | Re: [Csnd] Re: wiimote instrument |
there are only 2 function style macro definitions and a single instantiation for each in that orc. if i could find the new parser debug flag, i would send more verbose output. k. On 01/18/12 15:45, jpff@cs.bath.ac.uk wrote: > This change will/may confuse the diagnostics. 63 is magic, so I think I > need to think of a better plan. Did not reaise that peopl eused so many > macros > Give me some time. > > ==John ff > >>> these work fine, though the new parser chokes on wii_jazz2.orc >>> ******************** >>> * USING NEW PARSER * >>> ******************** >>> defining argument MOTE as...#0# >>> defining argument MOTE as...#0# >>> Too many file/macros >> I don't have a wii to try but I can help Kelly with >> 'Too many file/macros' error. It's a problem with >> diagnostics (git), but you know the code and here >> is a dirty trick: >> >> Engine/csound_orc_compile.c:1873 >> >> replace >> >> if (n=63) ... >> >> with >> >> if (n=63) free(filedir[--n]); >> >> It's provisional but so you can try wii_jazz2.orc (I hope) >> >> tito >> >> >> Send bugs reports to the Sourceforge bug tracker >> https://sourceforge.net/tracker/?group_id=81968&atid=564599 >> Discussions of bugs and features can be posted here >> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe >> csound" >> >> >> >> > > > > Send bugs reports to the Sourceforge bug tracker > https://sourceforge.net/tracker/?group_id=81968&atid=564599 > Discussions of bugs and features can be posted here > To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound" > Send bugs reports to the Sourceforge bug tracker https://sourceforge.net/tracker/?group_id=81968&atid=564599 Discussions of bugs and features can be posted here To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound" |
Date | 2012-01-20 00:19 |
From | Alex Weiss |
Subject | Re: [Csnd] Re: wiimote instrument |
Victor, What's the preferred wiimote to osc client program for Mac OS X? I've looked at OSCulator, but I'd prefer open software... Alex
On Wed, Jan 18, 2012 at 12:15 PM, Victor <Victor.Lazzarini@nuim.ie> wrote:
|
Date | 2012-01-20 22:01 |
From | k_o_m_p |
Subject | Re: [Csnd] Re: wiimote instrument |
I have been using OSCulator with wiimote and it works pretty good.
As far as I know there is no freeware software for this. Best, Luís Am 20.01.12 01:19, schrieb Alex Weiss: Victor, -- -- http://luisantunespena.eu |
Date | 2012-01-20 22:21 |
From | Victor Lazzarini |
Subject | Re: [Csnd] Re: wiimote instrument |
I use wiimote OSC 0.6, but I can't find it on the web anymore. Victor On 20 Jan 2012, at 22:01, k_o_m_p wrote:
Dr Victor Lazzarini Senior Lecturer Dept. of Music NUI Maynooth Ireland tel.: +353 1 708 3545 Victor dot Lazzarini AT nuim dot ie |
Date | 2012-01-20 22:31 |
From | Victor Lazzarini |
Subject | Re: [Csnd] Re: wiimote instrument |
I found this one also: http://www.davebv.com/music-controller-midi-and-osc-wiimoteVictor On 20 Jan 2012, at 22:21, Victor Lazzarini wrote:
Dr Victor Lazzarini Senior Lecturer Dept. of Music NUI Maynooth Ireland tel.: +353 1 708 3545 Victor dot Lazzarini AT nuim dot ie |
Date | 2012-01-20 22:41 |
From | Victor Lazzarini |
Subject | Re: [Csnd] Re: wiimote instrument |
and there is DarwiinRemote too. On 20 Jan 2012, at 22:31, Victor Lazzarini wrote:
Dr Victor Lazzarini Senior Lecturer Dept. of Music NUI Maynooth Ireland tel.: +353 1 708 3545 Victor dot Lazzarini AT nuim dot ie |
Date | 2012-01-21 05:19 |
From | Alex Weiss |
Subject | Re: [Csnd] Re: wiimote instrument |
Thanks! On Fri, Jan 20, 2012 at 2:41 PM, Victor Lazzarini <Victor.Lazzarini@nuim.ie> wrote:
|