Author |
Message |
jimmysword
Joined: Jan 11, 2008 Posts: 13 Location: Leeds, W Yorks
|
Posted: Mon Jan 21, 2008 5:24 pm Post subject:
Writing User Interface... Subject description: possible to control chuck from custom interface? |
|
|
I'm wondering if it's possible to write interfaces for controlling chuck. For instance I was thinking something with ncurses that would perhaps start chuck in interactive mode then send commands to chuck/report data back.
I'm pretty sure it's possible to construct guis for supercollider but don't know much about the subject... something tells me that SC has it's own widgets and stuff for that?
Anyway just an idea, would be nice if it is possible. |
|
Back to top
|
|
|
Kassen
Janitor
Joined: Jul 06, 2004 Posts: 7678 Location: The Hague, NL
G2 patch files: 3
|
Posted: Mon Jan 21, 2008 5:51 pm Post subject:
|
|
|
Hi!
I'd say that's quite possible. ChucK is just a command-line program so anything that can send commands to those can send them to ChucK. You can also enter code into the VM purely through the command-line, this code may -for example- receive OSC instructions coming from interface elements in the program you would write.
However, it might be good to know ChucK will have such things build into it, some of these already work on the Apple platform but porting them to Linux and Windows seems to be taking some time. That might affect how much effort you are willing to invest into rolling your own?
Welcome on board! _________________ Kassen |
|
Back to top
|
|
|
Inventor
Stream Operator
Joined: Oct 13, 2007 Posts: 6221 Location: near Austin, Tx, USA
Audio files: 267
|
Posted: Mon Jan 21, 2008 6:11 pm Post subject:
|
|
|
Kassen wrote: | However, it might be good to know ChucK will have such things build into it, some of these already work on the Apple platform but porting them to Linux and Windows seems to be taking some time. That might affect how much effort you are willing to invest into rolling your own?
|
That's ChucKtastic news to hear. And welcome ChucKist jimmysword. |
|
Back to top
|
|
|
renderful
Joined: Apr 18, 2007 Posts: 29 Location: Boulder, Co
|
|
Back to top
|
|
|
Inventor
Stream Operator
Joined: Oct 13, 2007 Posts: 6221 Location: near Austin, Tx, USA
Audio files: 267
|
Posted: Mon Jan 21, 2008 7:25 pm Post subject:
|
|
|
Maui-wowie, that was awesome! |
|
Back to top
|
|
|
Kassen
Janitor
Joined: Jul 06, 2004 Posts: 7678 Location: The Hague, NL
G2 patch files: 3
|
Posted: Mon Jan 21, 2008 7:55 pm Post subject:
|
|
|
Yeah, I've been lusting after that! It looks like some truly choice stuff, lots of lovely functions as well, I hope the porting issues get resolved. _________________ Kassen |
|
Back to top
|
|
|
Inventor
Stream Operator
Joined: Oct 13, 2007 Posts: 6221 Location: near Austin, Tx, USA
Audio files: 267
|
Posted: Mon Jan 21, 2008 8:16 pm Post subject:
|
|
|
Did I see an X-Y plot in there, or would I make one out of LED's? Thinking of using this on the math/music project if possible... |
|
Back to top
|
|
|
Kassen
Janitor
Joined: Jul 06, 2004 Posts: 7678 Location: The Hague, NL
G2 patch files: 3
|
Posted: Mon Jan 21, 2008 9:50 pm Post subject:
|
|
|
I don't see one but if you wanted to I imagine there is nothing keeping you from using LED's as pixels? That sounds like a highly impractical and perverse idea; I love it! _________________ Kassen |
|
Back to top
|
|
|
Inventor
Stream Operator
Joined: Oct 13, 2007 Posts: 6221 Location: near Austin, Tx, USA
Audio files: 267
|
Posted: Mon Jan 21, 2008 11:28 pm Post subject:
|
|
|
Kassen wrote: | I don't see one but if you wanted to I imagine there is nothing keeping you from using LED's as pixels? That sounds like a highly impractical and perverse idea; I love it! |
Yes, that is what I was thinking of... creating an LED display panel that acts as an oscilloscope, for example, displaying the waveform of the current sound. Could be the video component of the project. Highly impractical and perverse indeed! I aspire to that! |
|
Back to top
|
|
|
jimmysword
Joined: Jan 11, 2008 Posts: 13 Location: Leeds, W Yorks
|
Posted: Tue Jan 22, 2008 2:53 am Post subject:
|
|
|
Kassen wrote: | Hi!
I'd say that's quite possible. ChucK is just a command-line program so anything that can send commands to those can send them to ChucK. You can also enter code into the VM purely through the command-line, this code may -for example- receive OSC instructions coming from interface elements in the program you would write.
However, it might be good to know ChucK will have such things build into it, some of these already work on the Apple platform but porting them to Linux and Windows seems to be taking some time. That might affect how much effort you are willing to invest into rolling your own?
Welcome on board! |
Great news all round! I did notice there was some work being done for sliders and things but rather hoped that the bindings or whatever were already present in chuck. Interactive mode will do for the time being. I'll have a play anyway and see what can be done.
Would be cool to program arrays from a little gui. I'm seeing the bigger picture more and more while I think about it and I'm near certain some aspects of this will be achieved relatively simply. |
|
Back to top
|
|
|
Dr. Spankenstein
Joined: Mar 03, 2007 Posts: 136 Location: Cambridge
Audio files: 1
|
Posted: Tue Jan 22, 2008 3:52 am Post subject:
|
|
|
It would be great to see that MAUI frontend available for windows platforms.
I'm fortunate enough to have a MacBook partitioned with both operating systems on, but I find the Mac OSX port of ChucK has some incredibly odd timing issues and problems with the console input, etc.
Welcome to the board jimmy!
Rhys |
|
Back to top
|
|
|
kijjaz
Joined: Sep 20, 2004 Posts: 765 Location: bangkok, thailand
Audio files: 4
|
Posted: Tue Jan 22, 2008 8:41 am Post subject:
|
|
|
I once work on PD to act as a control interface for ChucK
(but my effort was 1-way.. from PD to ChucK)
I use sliders to send midi control change and wire it to chuck by Jack on linux.
it's quite convenient with Jack this way and it's quite flexible coz I don't have to compile any codes or anything.
just save in patches and load them on chuck & puredata and connect midi with Jack.
it's a simple idea and it's the only thing i can do now, hahahah,
but if you haven't tried, i think it worths a try.
on other system other than linux, i guess we'll have to use midi loopback programs for that. |
|
Back to top
|
|
|
jimmysword
Joined: Jan 11, 2008 Posts: 13 Location: Leeds, W Yorks
|
Posted: Tue Jan 22, 2008 9:14 am Post subject:
|
|
|
Using Pd's internal gui for sending midi is not a bad idea... I'd probably give it a go but I'm trying to have an x-less system for chucking as it doesn't need one.
I have a 16 knob midi controller which I'm sure I'll end up using (possibilties are endless ) but I want something graphical(ish) for pattern design/tweaking/selection. I've thought about it some more and I don't really need to have chuck report back to whatever interface I make (although it would be nice). As long as I have a range of fields I can insert values to (which then get sent to chuck) then I'm rockin' |
|
Back to top
|
|
|
Kassen
Janitor
Joined: Jul 06, 2004 Posts: 7678 Location: The Hague, NL
G2 patch files: 3
|
Posted: Tue Jan 22, 2008 10:00 am Post subject:
|
|
|
Dr. Spankenstein wrote: | I find the Mac OSX port of ChucK has some incredibly odd timing issues and problems with the console input, etc.
|
Really? Could you go into a bit more detail? _________________ Kassen |
|
Back to top
|
|
|
renderful
Joined: Apr 18, 2007 Posts: 29 Location: Boulder, Co
|
Posted: Tue Jan 22, 2008 10:24 am Post subject:
|
|
|
I'd also like to hear more about the OSX timing issues. Considering that Perry Cook, Ge and many others use Macbooks for demos and performances, I'd be surprised if it's not a configuration issue local to you machine. But this is PURE speculation.
By the way, I'm LOVING MAUI. Right now... since it's lacking many features of a normal GUI, it is GREAT for prototyping. Especially for using it to emulate a physical control interface, which I've yet to build. The quick syntax and prototyping ability really adds to the live programming concept, which I love. |
|
Back to top
|
|
|
Dr. Spankenstein
Joined: Mar 03, 2007 Posts: 136 Location: Cambridge
Audio files: 1
|
Posted: Sat Feb 16, 2008 5:35 pm Post subject:
|
|
|
Sorry for the late reply guys, I've been out of action for a while.
I can upload 2 sound files running from the same piece of code if you like, that both behave completely differently in terms of timing.
Console input refuses to work on MacBooks using the same code as PC.
I'll upload the code and sound files should you wanna investigate things further.
Thanks,
Rhys |
|
Back to top
|
|
|
Kassen
Janitor
Joined: Jul 06, 2004 Posts: 7678 Location: The Hague, NL
G2 patch files: 3
|
Posted: Sun Feb 17, 2008 11:05 am Post subject:
|
|
|
That would be good, yes.
Don't tell Steve but to me the largest appeal in getting a Mac would be that Ge uses one. I'm quite surprised to hear this, let's try&get to the bottom of this, and hand in a bug report because this is quite clearly wrong.
Could this be a matter of using different buffer-sizes on the two OS's and the influence of outside factors like HID or MIDI or OSC? _________________ Kassen |
|
Back to top
|
|
|
soundcyst
Joined: Feb 17, 2008 Posts: 18 Location: santa cruz, ca
|
Posted: Sun Feb 17, 2008 2:33 pm Post subject:
|
|
|
Hi, I'm not sure if this is the right thread, but I'm really interested in figuring out a number box/text box input for MAUI. is this really hard to accomplish? |
|
Back to top
|
|
|
Inventor
Stream Operator
Joined: Oct 13, 2007 Posts: 6221 Location: near Austin, Tx, USA
Audio files: 267
|
Posted: Mon Feb 18, 2008 12:18 am Post subject:
|
|
|
I just figured out that downloading the latest Mac release of the ChucK mini-audicle will give me MAUI powers (I'm slow that way), so I did it and started playing with guitar_lab.ck to make a user interface for it. So far I only have the logic of the boolean sequence (which says when to play the notes), and the only logic available is the or of ANDed terms. Though a limited first attempt, it does make some nice guitar riffs.
If you have a Mac and the latest version of ChucK, then you can load up the attached file. When you run it, you will see a start/stop button and an array of 8x8 buttons, plus 8 LEDs. Each column is a binary digit in an 8-bit count, while each row is an ANDed term. Just click on some of the array buttons, preferably some of the lower-order buttons to the right, and then click on start/stop. You will be treated to a guitar riff that you just created using kijjaz's guitar class.
There is so much more to add/do to this, but I thought I would send out the first working version to see if anyone finds it useful. I'm having a lot of fun with it. MAUI wowie dude!
Description: |
MAUI Boolean Sequencing Guitar Riff Lab - makes it easy to create your own guitar riffs. First attempt, logic only. |
|
Download |
Filename: |
MAUI_BS_guitar_lab1.ck |
Filesize: |
5.29 KB |
Downloaded: |
410 Time(s) |
|
|
Back to top
|
|
|
Inventor
Stream Operator
Joined: Oct 13, 2007 Posts: 6221 Location: near Austin, Tx, USA
Audio files: 267
|
|
Back to top
|
|
|
Kassen
Janitor
Joined: Jul 06, 2004 Posts: 7678 Location: The Hague, NL
G2 patch files: 3
|
Posted: Mon Feb 18, 2008 3:27 am Post subject:
|
|
|
Code: | for (0 => j[7]; j[7] < n; j[7]++) {
for (0 => j[6]; j[6] < n; j[6]++) {
for (0 => j[5]; j[5] < n; j[5]++) {
for (0 => j[4]; j[4] < n; j[4]++) {
for (0 => j[3]; j[3] < n; j[3]++) {
for (0 => j[2]; j[2] < n; j[2]++) {
for (0 => j[1]; j[1] < n; j[1]++) {
for (0 => j[0]; j[0] < n; j[0]++) {
|
erm...... WHAT?
Could you please explain why you are using this -erm- rather involved construction? I don't really understand what's going on here, particularly as I can't find any of those indexes in the code within the innermost loop? As far as I can see it just states "do this lots and lots of times" but the "while (true)" already did that as well? This looks very mysterious to me.
I already have trouble juggling all of the variables when I'm three layers of "for" loops deep and you're at 9 or something here... quite casually or so it appears, but I don't understand why? It looks like some way of dealing with permutations but I can't find the actual dealing with the permutations? _________________ Kassen |
|
Back to top
|
|
|
Inventor
Stream Operator
Joined: Oct 13, 2007 Posts: 6221 Location: near Austin, Tx, USA
Audio files: 267
|
Posted: Mon Feb 18, 2008 5:12 am Post subject:
|
|
|
Kassen, my man, thanks for looking at my code. I admit that eight nested for loops is probably a crude way to make a base-n counter but it is how I've been doing it. In the inner part of that loop you will see the term "j[b]", which is how I access the values of the loops.
The way it works is I first have an integer slider set "n", which is the base of the count. Then the for loops count from 0 to n-1 each and since they are nested, they act like the digits of a base-n counter.
I'm sure there's better ways of doing it, but that's how I have been doing it so far. It works OK for me.
Also, I took a photo of the front end for folks to see it if they don't have a Mac (cursed incompatibilities). Here is the image:
I have been playing around with the buttons for a few hours now, and I find that almost anything you put into the controls makes an interesting guitar riff. Adjusting the mandolin bodySize helps make different guitar sounds, especially when done in combination with different values of reverb. As to the base, only base 2 seems to work satisfactorily. At any rate, it's kind of fun to play with it and make some cool guitar riffs. |
|
Back to top
|
|
|
Kassen
Janitor
Joined: Jul 06, 2004 Posts: 7678 Location: The Hague, NL
G2 patch files: 3
|
Posted: Mon Feb 18, 2008 5:33 am Post subject:
|
|
|
Ah, thanks, makes perfect sense now. That's probably quite efficient as well but if you see it for the first time it looks completely crazy. :¬)
Interface looks great, BTW, good stuff! _________________ Kassen |
|
Back to top
|
|
|
Inventor
Stream Operator
Joined: Oct 13, 2007 Posts: 6221 Location: near Austin, Tx, USA
Audio files: 267
|
Posted: Mon Feb 18, 2008 12:01 pm Post subject:
|
|
|
Thanks, Kassen, I've been working on it for half a day now and its turning out quite nice indeed. I added other instruments, so there is a Flute, kijjaz's Snare and Drum, plus a Mandolin. I recorded an mp3 file of the audio output of the program for one of the more interesting riffs.
Although almost anything sounds OK, it takes work and strategy to get a riff that changes over time with different sounding sections to the music. I got good results by using an increasing / alternating pattern for frequency, an "X" pattern for the sequencing, and turning the bodySize down and the reverb up, plus setting a low range of frequencies for the guitar. Also I'm discovering that you can divide-and-conquer the sequencing by setting treating the upper-order bits as a time counter and the lower order bits as multiple sub-sequences that launch or not according to the upper bit settings.
Anyway it turned out pretty good so far.
Description: |
Recorded output of MAUI guitar lab, one of the better riffs with deep bass like thunder and a big buildup to a reverb-echoed ending. |
|
Download |
Filename: |
MAUI_good_riff.mp3 |
Filesize: |
1016.73 KB |
Downloaded: |
1268 Time(s) |
|
|
Back to top
|
|
|
Kassen
Janitor
Joined: Jul 06, 2004 Posts: 7678 Location: The Hague, NL
G2 patch files: 3
|
Posted: Mon Feb 18, 2008 1:02 pm Post subject:
|
|
|
I love it.
I'm hoping the interface thingies will come to Windows and/or Linux soon as well because this looks great.... Keep at it! _________________ Kassen |
|
Back to top
|
|
|
|