Author |
Message |
Antimon
Joined: Jan 18, 2005 Posts: 4145 Location: Sweden
Audio files: 371
G2 patch files: 100
|
Posted: Thu Jul 10, 2008 1:20 pm Post subject:
SampleComposer |
 |
|
Edit 2008-07-19: updated with final version - see new message lower down for details
Edit 2008-07-13: updated all files with new version - see new message lower down for details
Here's a little sample GUI/tool I've made. It consist of a graphical front-end written in Java and a sound making back-end written in ChucK. The two communicate using OSC.
The reason for choosing Java and ChucK in this way are a bit fuzzy, but the basic idea was that I wanted a tool where I can place grains freely and modify their lengths, speeds and basic envelopes easily. And then I was curious about SWT (a graphics system for Java), and if I could get an OK OSC API and if it would work well using OSC to separate and then tie together the GUI and the sound engine. It looks interesting, maybe even promising. It would be interesting to see if anyone finds this useful (check the attached screenshot).
I have ideas for more features, but I feel one of those lazy surges coming on, so I figured it would be just as well to get this out now before apathy sets in. And I have also run into a problem - this currently only works on the Mac, because when I set to test it on my PC just now, it turned out that OSC works differently there.
The idea is that you start the ChucK runtimefirst (chuck chuck/sample_runtime.ck), and then you start the Java app, which sends an OSC command to chuck. But new DatagramSocket(8300) (that is intended to be used for sending data from Java to ChucK) throws a BindException, complaining that the address is already in use. This isn't how I thought UDP was supposed to work. Any ideas? As I said, this works nicely on the Mac.
Edit: I consulted a UDP expert and got it fixed. I have now attached a zip archive for Windows. You need to have the bin directory for Java 1.5 or later in your path - or you can just edit the .bat file and insert the full path to the java command. You need to run the bat file from the command line.
I'm attaching the eclipse projects for SampleComposer and OscCommunication (my homebrewed OSC comm library), as well as an attempt at making a .dmg executable archive for the Mac. If you have any questions about my poorly documented code, I'll be happy to try to answer
Oh yeah - check the menus for available commands for scrolling and loading samples etc.
/Stefan
Description: |
|
Filesize: |
311.08 KB |
Viewed: |
270 Time(s) |
This image has been reduced to fit the page. Click on it to enlarge. |

|
Description: |
|
 Download (listen) |
Filename: |
OscCommunication.zip |
Filesize: |
20.78 KB |
Downloaded: |
280 Time(s) |
Description: |
|
 Download (listen) |
Filename: |
SampleComposer.dmg |
Filesize: |
1.67 MB |
Downloaded: |
292 Time(s) |
Description: |
|
 Download (listen) |
Filename: |
SampleComposer.zip |
Filesize: |
1.3 MB |
Downloaded: |
280 Time(s) |
Description: |
|
 Download (listen) |
Filename: |
SampleComposer_src.zip |
Filesize: |
92.61 KB |
Downloaded: |
274 Time(s) |
_________________ Antimon's Window
@soundcloud @Flattr home - you can't explain music Last edited by Antimon on Sat Jul 19, 2008 6:18 am; edited 4 times in total |
|
Back to top
|
|
 |
Antimon
Joined: Jan 18, 2005 Posts: 4145 Location: Sweden
Audio files: 371
G2 patch files: 100
|
Posted: Thu Jul 10, 2008 1:23 pm Post subject:
|
 |
|
And yeah, there are some things that I definitely am going to fix, like make moveing the start arrow actually change the start time in ChucK, and maybe remove those text labels that don't do anything... Probably other stuff as well.
/Stefan _________________ Antimon's Window
@soundcloud @Flattr home - you can't explain music |
|
Back to top
|
|
 |
blue hell
Site Admin

Joined: Apr 03, 2004 Posts: 24461 Location: The Netherlands, Enschede
Audio files: 297
G2 patch files: 320
|
Posted: Thu Jul 10, 2008 2:12 pm Post subject:
|
 |
|
C L _________________ Jan
also .. could someone please turn down the thermostat a bit.
 |
|
Back to top
|
|
 |
Antimon
Joined: Jan 18, 2005 Posts: 4145 Location: Sweden
Audio files: 371
G2 patch files: 100
|
Posted: Fri Jul 11, 2008 1:46 pm Post subject:
|
 |
|
Thanks Jan. I just got the Windows version working, and I've added a zip file at the start of this topic.
Maybe I should say something more about the few features that are in there. You can scroll around and zoom using the keys h, j, k, or l (or the menus). If you double-click the start arrow or press space the samples will play in the sequence the are positioned. If you click on the edges of a sample box it will shrink or expand, thus playing only a part of its sample. If you click on the black bar on a shrunken sample, you change which part is being played.
If you hold down command on Mac or control on other platforms while clicking on the edge of a sample, the box shrinks or expands but it will still play the same part of the sample, meaning that the speed at which that sample is played changes.
You can delete the selected box by hitting backspace. A shortcut to loading samples is command/control p. You'll notice that you can't overlap boxes for the same sample (each sample player only has one voice). However, you can load the same sample several times, and get polyphony that way.
/Stefan _________________ Antimon's Window
@soundcloud @Flattr home - you can't explain music |
|
Back to top
|
|
 |
Antimon
Joined: Jan 18, 2005 Posts: 4145 Location: Sweden
Audio files: 371
G2 patch files: 100
|
Posted: Sun Jul 13, 2008 8:34 am Post subject:
|
 |
|
New version - updated files at the top of this thread.
I've added a modulation matrix thingie, so you can modulate the playback speed (pitch), start offset, attack, decay and volume for each sample box on the sheet. Modulation source is either randomness, or an LFO (you can create several of those).
You can also move around the start arrow and thus change when the first sample plays (and which is the first sample). I've also made the thing listen to a midi note that will start the sequence - click the start arrow and edit the channel/note at the bottom right.
In the mod matrix each sample box is identified by three numbers separated by commas. You can see which numbers belong to a box by clicking it and looking in the bottom right box.
The main remaining thing I will try to make this app do is having several sheets listening to different midi notes. There are also some bugs I'm going to clean out. Then I think I'll leave it. My philosophy here is: if it's to hard or messy to program, don't do it. After all, this is ChucK at the bottom, so customizing stuff in the code shouldn't be too difficult.
/Stefan _________________ Antimon's Window
@soundcloud @Flattr home - you can't explain music |
|
Back to top
|
|
 |
Antimon
Joined: Jan 18, 2005 Posts: 4145 Location: Sweden
Audio files: 371
G2 patch files: 100
|
Posted: Sat Jul 19, 2008 6:23 am Post subject:
|
 |
|
OK, I've added a couple more features and updated the files and screenshot in the first post. You can now have several sheets of samples, meaning that you can have multi-timbral, monophonic action, with each set of samples responding to its own midi note.
I've also added the possibility to modulate on midi velocity, so you can e.g. have some grains speed up for higher velocities, or have all grains lower their volume, if you like.
These were the final features that I wanted for myself, so I'll probably leave this now, bar the odd bug fix. Remaining things that I've thought of, but won't implement, are the ability to save the project, and modulation on midi CC messages.
/Stefan _________________ Antimon's Window
@soundcloud @Flattr home - you can't explain music |
|
Back to top
|
|
 |
|