From jsyn at music.columbia.edu Tue Apr 3 09:17:19 2007 From: jsyn at music.columbia.edu (jsyn@music.columbia.edu) Date: Tue Apr 3 09:17:33 2007 Subject: [jsyn] WAVFileWriter Message-ID: <41257.146.227.21.149.1175606239.squirrel@europa.cse.dmu.ac.uk> Hi. I'm trying to use a WAVFileWriter for offline processing of very large files that cannot fit into memory. When I've used WAVFileWriter to write whole samples at once from a short[] I've had no problem. I open a RandomAccessFile, I create a WAVFileWriter based on that RandomAccessFile, and I call "write(short[] samples, int channelsPerFrame, int sampleRate)". And that works. But now I have to write headers and data chunks individually. I've tried all likely combinations of headers, format chunks, etc., but the output file is not recognised as a WAV file. I can't find an example that writes a WAV file in several chunks. I've found this: http://tech.groups.yahoo.com/group/jsyn/message/226 but reverse engineering it to say that I should create the header with: wavWriter.writeHeader( NUM_REC_CHANNELS, (int) FRAME_RATE ); and then call fixSizes() at the end doesn't work either. So I'm a bit stuck. I presume that if I'm writing many data chunks, that I write a data chunk header for each, and then the data, such as: wfw.writeDataChunkHeader( data.length ); wfw.writeDataChunk( data ); but something is going wrong. mplayer is able to play back the sample, but it identifies is as a raw pcm file and there's a click at the start, presumably the header interpreted as raw pcm. Any examples around? Or further information? Cheers, Ross-c From jsyn at music.columbia.edu Tue Apr 3 13:03:11 2007 From: jsyn at music.columbia.edu (jsyn@music.columbia.edu) Date: Tue Apr 3 13:02:57 2007 Subject: [jsyn] WAVFileWriter In-Reply-To: <41257.146.227.21.149.1175606239.squirrel@europa.cse.dmu.ac.uk> References: <41257.146.227.21.149.1175606239.squirrel@europa.cse.dmu.ac.uk> Message-ID: <461288CF.70102@softsynth.com> Hello Ross, > wfw.writeDataChunkHeader( data.length ); > wfw.writeDataChunk( data ); That won't work because writeDataChunk() also calls writeDataChunkHeader(). Here is the source: /** Write a data chunk to the WAV file containing the given short array. * Multi-channel data should be interleaved. */ public void writeDataChunk( short samples[] ) throws IOException { writeDataChunkHeader( samples.length*2 ); for( int i=0; i Dear list, my name is Antonio Della Marina, I am a sound artist from Italy, it's a pleasure for me to join this community. I want to add some sound to a website project I'm working on, and I need the sound to be generated in real time (and not read) so I think Jsyn and JMSL are the best choice (let me express my gratitude for your efforts). To be sincere I don't have any skill in java programming, so I started with Wire, hoping to adapt a simple patch I made with Max/ MSP, but I soon got stuck. Maybe you can help me with some ready-made stuff I can modify, adapt, or just use "as it is" under your permission. Going to the point, my needs are as follows: random sinewave (range 30 - 18000 hz) with random amplitude (range 0. - 0.9) with pan driven by red noise (control rate, slow freq) with envelope: fade-in duration (random range from 1. - 20 seconds) sustain duration (random range from 1. - 20 secs) fade-out duration (random range 1. - 20 secs) silence duration (random 1. - 20 secs) again from the beginning with new random values (all random values are independent) (s-shape ramps for fade in/out would be great to obtain softer edges, but this is a second priority and probably easy to shape by envpoints) Sorry for asking so straight, any help is highly appreciate. I don't want to be lazy, but maybe it's a very easy task for you, while it might take a lot of time to me. Even simple hints are super welcome, I'm not afraid of spending nights on it. (for example I don't know how I can pass random values to envelope points.. and how to loop the whole process) Best and have a happy Easter :) Antonio From jsyn at music.columbia.edu Sat Apr 7 12:48:53 2007 From: jsyn at music.columbia.edu (jsyn@music.columbia.edu) Date: Sat Apr 7 12:53:19 2007 Subject: [jsyn] hello, can you please help me? In-Reply-To: <368535A1-B92A-4F80-8AD0-B3AF23247A32@gmail.com> References: <368535A1-B92A-4F80-8AD0-B3AF23247A32@gmail.com> Message-ID: <4617CB75.1040700@softsynth.com> Hello Antonio, Wire is primarily for designing audio rate circuits. Your random ramps are more of a control rate process. That would be easy to do in Java but not so easy in Wire. In Java you could create an EnvelopePlayer and then simply queue up your random segments as needed. Thank you, Phil Burk --------------------------------------- SoftSynth, Audio Research and Development http://www.softsynth.com/ 75 Pleasant Lane, San Rafael, CA, 94901 USA Phone/FAX: 1-415-453-4320 --------------------------------------- > fade-in duration (random range from 1. - 20 seconds) > sustain duration (random range from 1. - 20 secs) > fade-out duration (random range 1. - 20 secs) > silence duration (random 1. - 20 secs) > again from the beginning with new random values From jsyn at music.columbia.edu Tue Apr 10 08:49:08 2007 From: jsyn at music.columbia.edu (jsyn@music.columbia.edu) Date: Tue Apr 10 08:28:43 2007 Subject: [jsyn] hello, can you please help me? In-Reply-To: <4617CB75.1040700@softsynth.com> References: <368535A1-B92A-4F80-8AD0-B3AF23247A32@gmail.com> <4617CB75.1040700@softsynth.com> Message-ID: <96604979-9F0C-49C1-8B92-D6FB9D356DE1@gmail.com> Thank you Phil, but how? do you mean to build fixed values EnvPlayer with wire and then save as java and modify the code just by adding some math.rand? would this be possible? Antonio Il giorno 07/apr/07, alle ore 18:48, jsyn@music.columbia.edu ha scritto: > > > Wire is primarily for designing audio rate circuits. Your random > ramps are more of a control rate process. That would be easy to do > in Java but not so easy in Wire. > > In Java you could create an EnvelopePlayer and then simply queue up > your random segments as needed. > > Thank you, > Phil Burk > >> fade-in duration (random range from 1. - 20 seconds) >> sustain duration (random range from 1. - 20 secs) >> fade-out duration (random range 1. - 20 secs) >> silence duration (random 1. - 20 secs) >> again from the beginning with new random values > _______________________________________________ > JSyn mailing list > JSyn@music.columbia.edu > To change digest mode or to make other administrative changes visit: > http://music.columbia.edu/mailman/listinfo/jsyn From jsyn at music.columbia.edu Tue Apr 10 12:03:53 2007 From: jsyn at music.columbia.edu (jsyn@music.columbia.edu) Date: Tue Apr 10 12:04:07 2007 Subject: [jsyn] hello, can you please help me? In-Reply-To: <96604979-9F0C-49C1-8B92-D6FB9D356DE1@gmail.com> Message-ID: Hi Antonio, The code for two my compositions is still available on the old Jsyn Yahoo Group. http://tech.groups.yahoo.com/group/jsyn/files/compositions/ There is a lot of random stuff going on there and you can use it for examples. John Clavin www.algorithmicjazz.com -----Original Message----- From: jsyn-bounces@music.columbia.edu [mailto:jsyn-bounces@music.columbia.edu]On Behalf Of jsyn@music.columbia.edu Sent: Tuesday, April 10, 2007 5:49 AM To: jsyn@music.columbia.edu Subject: Re: [jsyn] hello, can you please help me? Thank you Phil, but how? do you mean to build fixed values EnvPlayer with wire and then save as java and modify the code just by adding some math.rand? would this be possible? Antonio Il giorno 07/apr/07, alle ore 18:48, jsyn@music.columbia.edu ha scritto: > > > Wire is primarily for designing audio rate circuits. Your random > ramps are more of a control rate process. That would be easy to do > in Java but not so easy in Wire. > > In Java you could create an EnvelopePlayer and then simply queue up > your random segments as needed. > > Thank you, > Phil Burk > >> fade-in duration (random range from 1. - 20 seconds) >> sustain duration (random range from 1. - 20 secs) >> fade-out duration (random range 1. - 20 secs) >> silence duration (random 1. - 20 secs) >> again from the beginning with new random values > _______________________________________________ > JSyn mailing list > JSyn@music.columbia.edu > To change digest mode or to make other administrative changes visit: > http://music.columbia.edu/mailman/listinfo/jsyn _______________________________________________ JSyn mailing list JSyn@music.columbia.edu To change digest mode or to make other administrative changes visit: http://music.columbia.edu/mailman/listinfo/jsyn From jsyn at music.columbia.edu Wed Apr 11 16:42:47 2007 From: jsyn at music.columbia.edu (jsyn@music.columbia.edu) Date: Wed Apr 11 16:41:41 2007 Subject: [jsyn] hello, can you please help me? In-Reply-To: <96604979-9F0C-49C1-8B92-D6FB9D356DE1@gmail.com> References: <368535A1-B92A-4F80-8AD0-B3AF23247A32@gmail.com> <4617CB75.1040700@softsynth.com> <96604979-9F0C-49C1-8B92-D6FB9D356DE1@gmail.com> Message-ID: <461D4847.4070602@softsynth.com> Hello Antonio, > but how? do you mean to build fixed values EnvPlayer with wire and then You can build circuits either with Wire, or by hand. Wire helps you keep track of the connections. > save as java and modify the code just by adding some math.rand? > would this be possible? Once you have a circuit with the envelope player then you can queue() parts of the envelope whenever you want. You can create random envelope. A description of envelope usage is here: http://www.softsynth.com/jsyn/tutorial/envelopes.html An even easier way might be to use a LinearLag unit. You can set() the time value to control how fast you want it to change. Then set the input port to the target value. The output will slowly change to match the input. http://www.softsynth.com/jsyn/docs/autodocs/com/softsynth/jsyn/LinearLag.html Something like the following: LinearLag lag = new LinearLag(); lag.output.connect( whatever.input ); lag.start(); double duration = Math.random() * 5.0; lag.time.set( duration ); double target = Math.random(); lag.input.set( target ); Thank you, Phil Burk --------------------------------------- SoftSynth, Audio Research and Development http://www.softsynth.com/ 75 Pleasant Lane, San Rafael, CA, 94901 USA Phone/FAX: 1-415-453-4320 --------------------------------------- jsyn@music.columbia.edu wrote: > Thank you Phil, > but how? do you mean to build fixed values EnvPlayer with wire and then > save as java and modify the code just by adding some math.rand? > would this be possible? > > > Antonio > > Il giorno 07/apr/07, alle ore 18:48, jsyn@music.columbia.edu ha scritto: > >> >> >> Wire is primarily for designing audio rate circuits. Your random >> ramps are more of a control rate process. That would be easy to do in >> Java but not so easy in Wire. >> >> In Java you could create an EnvelopePlayer and then simply queue up >> your random segments as needed. >> >> Thank you, >> Phil Burk >> >>> fade-in duration (random range from 1. - 20 seconds) >>> sustain duration (random range from 1. - 20 secs) >>> fade-out duration (random range 1. - 20 secs) >>> silence duration (random 1. - 20 secs) >>> again from the beginning with new random values From jsyn at music.columbia.edu Sat Apr 14 17:36:28 2007 From: jsyn at music.columbia.edu (jsyn@music.columbia.edu) Date: Sat Apr 14 17:15:58 2007 Subject: [jsyn] absolute beginner In-Reply-To: <461D4847.4070602@softsynth.com> References: <368535A1-B92A-4F80-8AD0-B3AF23247A32@gmail.com> <4617CB75.1040700@softsynth.com> <96604979-9F0C-49C1-8B92-D6FB9D356DE1@gmail.com> <461D4847.4070602@softsynth.com> Message-ID: Hi, sorry guys for this very beguinner troubles, but I really cannot figure out how to run any of the examples in the tutorial. I executed the "install_jsyn.command" so now the .jar and the libJSynV142.jnilib files are in my java/extensions folder Every applet in the tutorials work fine , but when I try to run a .class file nothing happens. I tried with MacOSX terminal with the java command, but only exceptions spring out I did many tries, basically this way: Compiled the file TJ_Beep.java with javac omicron:/Applications/Audio Pro/JSyn/jsyn142macosxSDK/classes/mystuff Toni$ javac TJ_Beep.java Note: TJ_Beep.java uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details. omicron:/Applications/Audio Pro/JSyn/jsyn142macosxSDK/classes/mystuff Toni$ then I have my .class file. but when I enter: java TJ_Beep I get: Exception in thread "main" java.lang.NoClassDefFoundError: TJ_Beep (wrong name: mystuff/TJ_Beep) at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:620) at java.security.SecureClassLoader.defineClass (SecureClassLoader.java:124) at java.net.URLClassLoader.defineClass(URLClassLoader.java:260) at java.net.URLClassLoader.access$100(URLClassLoader.java:56) at java.net.URLClassLoader$1.run(URLClassLoader.java:195) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:188) at java.lang.ClassLoader.loadClass(ClassLoader.java:306) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java: 268) at java.lang.ClassLoader.loadClass(ClassLoader.java:251) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java: 319) Same with the VerySimpleSound example in the tutorial. What's wrong with? I tried with adding classpath, -jar, moving files, restarting, renaming.... uff! I did the diagnostic applet online: java.version = 1.5.0_07 java.vendor = Apple Computer, Inc. os.name = Mac OS X os.arch = ppc os.version = 10.4.8 SUCCESS #1 - Loaded JSyn com.softsynth.jsyn.CuePoint Class. SUCCESS #2 - Loaded JSyn com.softsynth.support.JSynDiagnostic Class. SUCCESS #3 - Loaded DLL version 142. SUCCESS #4 - Started JSyn in NON-real-time! SUCCESS #5 - Started JSyn for output in real-time-mode. SUCCESS #6 - Started JSyn for input in real-time-mode. SUCCESS #7 - Started JSyn for simultaneous input AND output in real- time-mode. Here are my browser characteristics: navigator.appName = Netscape navigator.appCodeName = Mozilla navigator.appVersion = 5.0 (Macintosh; U; PPC Mac OS X; it-it) AppleWebKit/418.9.1 (KHTML, like Gecko) Safari/419.3 navigator.platform = MacPPC navigator.userAgent = Mozilla/5.0 (Macintosh; U; PPC Mac OS X; it- it) AppleWebKit/418.9.1 (KHTML, like Gecko) Safari/419.3 document.layers is UNdefined. document.all is UNdefined. Java is enabled for this browser. I bought a huge java manual, but please... some hints are highly appreciated.. antonio From jsyn at music.columbia.edu Sat Apr 14 17:46:35 2007 From: jsyn at music.columbia.edu (jsyn@music.columbia.edu) Date: Sat Apr 14 17:47:19 2007 Subject: [jsyn] absolute beginner In-Reply-To: References: <368535A1-B92A-4F80-8AD0-B3AF23247A32@gmail.com> <4617CB75.1040700@softsynth.com> <96604979-9F0C-49C1-8B92-D6FB9D356DE1@gmail.com> <461D4847.4070602@softsynth.com> Message-ID: <46214BBB.1030408@softsynth.com> Hello Antonio, > Exception in thread "main" java.lang.NoClassDefFoundError: TJ_Beep Please look in the SDK for the file "mac_osx/README.txt". It has instructions on how to compile and run JSyn programs from the command line. You can try this: cd mac_osx make mystuff make mystuff.TJ_Beep I just tried it again and it worked. You can look in the Makefile to see what is happening at the command level. Thank you, Phil Burk --------------------------------------- SoftSynth, Audio Research and Development http://www.softsynth.com/ 75 Pleasant Lane, San Rafael, CA, 94901 USA Phone/FAX: 1-415-453-4320 --------------------------------------- From jsyn at music.columbia.edu Sat Apr 14 17:55:01 2007 From: jsyn at music.columbia.edu (jsyn@music.columbia.edu) Date: Sat Apr 14 17:55:11 2007 Subject: [jsyn] absolute beginner In-Reply-To: References: <368535A1-B92A-4F80-8AD0-B3AF23247A32@gmail.com> <4617CB75.1040700@softsynth.com> <96604979-9F0C-49C1-8B92-D6FB9D356DE1@gmail.com> <461D4847.4070602@softsynth.com> Message-ID: <2883ceb2fa11bc811aced0a9ee62e634@mail.rockefeller.edu> Hello Antonio Command line compilation will work for these examples once you get Phil's Make suggestion going. But it really does not offer a promising future for your further exploration of Java and JSyn. Please consider using Eclipse, which is a free Java IDE (www.eclipse.org). Good luck! Nick On Apr 14, 2007, at 2:36 PM, jsyn@music.columbia.edu wrote: > Hi, > sorry guys for this very beguinner troubles, but I really cannot > figure out how to run any of the examples in the tutorial. > I executed the "install_jsyn.command" so now the .jar and the > libJSynV142.jnilib files are in my java/extensions folder > Every applet in the tutorials work fine , but when I try to run a > .class file nothing happens. > I tried with MacOSX terminal with the java command, but only > exceptions spring out > > I did many tries, basically this way: > > Compiled the file TJ_Beep.java with javac > > omicron:/Applications/Audio Pro/JSyn/jsyn142macosxSDK/classes/mystuff > Toni$ javac TJ_Beep.java > Note: TJ_Beep.java uses or overrides a deprecated API. > Note: Recompile with -Xlint:deprecation for details. > omicron:/Applications/Audio Pro/JSyn/jsyn142macosxSDK/classes/mystuff > Toni$ > > then I have my .class file. > but when I enter: java TJ_Beep I get: > > Exception in thread "main" java.lang.NoClassDefFoundError: TJ_Beep > (wrong name: mystuff/TJ_Beep) > at java.lang.ClassLoader.defineClass1(Native Method) > at java.lang.ClassLoader.defineClass(ClassLoader.java:620) > at > java.security.SecureClassLoader.defineClass(SecureClassLoader.java: > 124) > at java.net.URLClassLoader.defineClass(URLClassLoader.java:260) > at java.net.URLClassLoader.access$100(URLClassLoader.java:56) > at java.net.URLClassLoader$1.run(URLClassLoader.java:195) > at java.security.AccessController.doPrivileged(Native Method) > at java.net.URLClassLoader.findClass(URLClassLoader.java:188) > at java.lang.ClassLoader.loadClass(ClassLoader.java:306) > at > sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268) > at java.lang.ClassLoader.loadClass(ClassLoader.java:251) > at > java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319) > > > Same with the VerySimpleSound example in the tutorial. > What's wrong with? > I tried with adding classpath, -jar, moving files, restarting, > renaming.... uff! > > > > I did the diagnostic applet online: > java.version = 1.5.0_07 > java.vendor = Apple Computer, Inc. > os.name = Mac OS X > os.arch = ppc > os.version = 10.4.8 > SUCCESS #1 - Loaded JSyn com.softsynth.jsyn.CuePoint Class. > SUCCESS #2 - Loaded JSyn com.softsynth.support.JSynDiagnostic Class. > SUCCESS #3 - Loaded DLL version 142. > SUCCESS #4 - Started JSyn in NON-real-time! > SUCCESS #5 - Started JSyn for output in real-time-mode. > SUCCESS #6 - Started JSyn for input in real-time-mode. > SUCCESS #7 - Started JSyn for simultaneous input AND output in > real-time-mode. > > > Here are my browser characteristics: > navigator.appName = Netscape > navigator.appCodeName = Mozilla > navigator.appVersion = 5.0 (Macintosh; U; PPC Mac OS X; it-it) > AppleWebKit/418.9.1 (KHTML, like Gecko) Safari/419.3 > navigator.platform = MacPPC > navigator.userAgent = Mozilla/5.0 (Macintosh; U; PPC Mac OS X; > it-it) AppleWebKit/418.9.1 (KHTML, like Gecko) Safari/419.3 > document.layers is UNdefined. > document.all is UNdefined. > Java is enabled for this browser. > > I bought a huge java manual, but please... some hints are highly > appreciated.. > > antonio > > _______________________________________________ > JSyn mailing list > JSyn@music.columbia.edu > To change digest mode or to make other administrative changes visit: > http://music.columbia.edu/mailman/listinfo/jsyn From jsyn at music.columbia.edu Sat Apr 14 19:21:32 2007 From: jsyn at music.columbia.edu (jsyn@music.columbia.edu) Date: Sat Apr 14 19:00:59 2007 Subject: [jsyn] absolute beginner In-Reply-To: <46214BBB.1030408@softsynth.com> References: <368535A1-B92A-4F80-8AD0-B3AF23247A32@gmail.com> <4617CB75.1040700@softsynth.com> <96604979-9F0C-49C1-8B92-D6FB9D356DE1@gmail.com> <461D4847.4070602@softsynth.com> <46214BBB.1030408@softsynth.com> Message-ID: <541D8472-D537-4485-B9D8-7E229D001CB8@gmail.com> ah, yes, I tried already. But it says: -bash: make: command not found .. Il giorno 14/apr/07, alle ore 23:46, jsyn@music.columbia.edu ha scritto: > Hello Antonio, > > > Exception in thread "main" java.lang.NoClassDefFoundError: TJ_Beep > > Please look in the SDK for the file "mac_osx/README.txt". > > It has instructions on how to compile and run JSyn programs from > the command line. > > You can try this: > > cd mac_osx > make mystuff > make mystuff.TJ_Beep > > I just tried it again and it worked. > > You can look in the Makefile to see what is happening at the > command level. > > Thank you, > Phil Burk > --------------------------------------- > SoftSynth, Audio Research and Development > http://www.softsynth.com/ > 75 Pleasant Lane, San Rafael, CA, 94901 USA > Phone/FAX: 1-415-453-4320 > --------------------------------------- > > _______________________________________________ > JSyn mailing list > JSyn@music.columbia.edu > To change digest mode or to make other administrative changes visit: > http://music.columbia.edu/mailman/listinfo/jsyn From jsyn at music.columbia.edu Sat Apr 14 19:12:13 2007 From: jsyn at music.columbia.edu (jsyn@music.columbia.edu) Date: Sat Apr 14 19:12:26 2007 Subject: [jsyn] absolute beginner In-Reply-To: <541D8472-D537-4485-B9D8-7E229D001CB8@gmail.com> References: <368535A1-B92A-4F80-8AD0-B3AF23247A32@gmail.com> <4617CB75.1040700@softsynth.com> <96604979-9F0C-49C1-8B92-D6FB9D356DE1@gmail.com> <461D4847.4070602@softsynth.com> <46214BBB.1030408@softsynth.com> <541D8472-D537-4485-B9D8-7E229D001CB8@gmail.com> Message-ID: <2AC43822-E2A8-4F46-B9E4-8DA3B72CC6C5@ibiblio.org> On Apr 14, 2007, at 4:21 PM, jsyn@music.columbia.edu wrote: > ah, yes, I tried already. But it says: > -bash: make: command not found You, sir, need to install the XCode tools (https://connect.apple.com/ cgi-bin/WebObjects/MemberSite.woa/wa/getSoftware?bundleID=19681). See how things go after that. --- Joe M. From jsyn at music.columbia.edu Sun Apr 15 10:36:11 2007 From: jsyn at music.columbia.edu (jsyn@music.columbia.edu) Date: Sun Apr 15 10:19:54 2007 Subject: [jsyn] absolute beginner In-Reply-To: <2AC43822-E2A8-4F46-B9E4-8DA3B72CC6C5@ibiblio.org> References: <368535A1-B92A-4F80-8AD0-B3AF23247A32@gmail.com> <4617CB75.1040700@softsynth.com> <96604979-9F0C-49C1-8B92-D6FB9D356DE1@gmail.com> <461D4847.4070602@softsynth.com> <46214BBB.1030408@softsynth.com> <541D8472-D537-4485-B9D8-7E229D001CB8@gmail.com> <2AC43822-E2A8-4F46-B9E4-8DA3B72CC6C5@ibiblio.org> Message-ID: <296849BF-FFCE-4665-AFFB-632F22441597@gmail.com> XCode toools!! that's why!!! .. a-hem.. infact now it works :-) thank you all. Toni Il giorno 15/apr/07, alle ore 01:12, jsyn@music.columbia.edu ha scritto: > > On Apr 14, 2007, at 4:21 PM, jsyn@music.columbia.edu wrote: > >> ah, yes, I tried already. But it says: >> -bash: make: command not found > > You, sir, need to install the XCode tools (https:// > connect.apple.com/cgi-bin/WebObjects/MemberSite.woa/wa/getSoftware? > bundleID=19681). See how things go after that. > > --- Joe M. > _______________________________________________ From jsyn at music.columbia.edu Mon Apr 16 12:38:10 2007 From: jsyn at music.columbia.edu (jsyn@music.columbia.edu) Date: Mon Apr 16 12:37:23 2007 Subject: [jsyn] absolute beginner In-Reply-To: <296849BF-FFCE-4665-AFFB-632F22441597@gmail.com> References: <368535A1-B92A-4F80-8AD0-B3AF23247A32@gmail.com> <4617CB75.1040700@softsynth.com> <96604979-9F0C-49C1-8B92-D6FB9D356DE1@gmail.com> <461D4847.4070602@softsynth.com> <46214BBB.1030408@softsynth.com> <541D8472-D537-4485-B9D8-7E229D001CB8@gmail.com> <2AC43822-E2A8-4F46-B9E4-8DA3B72CC6C5@ibiblio.org> <296849BF-FFCE-4665-AFFB-632F22441597@gmail.com> Message-ID: <4623A672.9060502@softsynth.com> >> You, sir, need to install the XCode tools Thanks for the tip! I updated the online docs. http://www.softsynth.com/jsyn/docs/host_mac_osx.html Thank you, Phil Burk From jsyn at music.columbia.edu Mon Apr 16 12:49:47 2007 From: jsyn at music.columbia.edu (jsyn@music.columbia.edu) Date: Mon Apr 16 12:50:19 2007 Subject: [jsyn] absolute beginner In-Reply-To: <4623A672.9060502@softsynth.com> References: <368535A1-B92A-4F80-8AD0-B3AF23247A32@gmail.com> <4617CB75.1040700@softsynth.com> <96604979-9F0C-49C1-8B92-D6FB9D356DE1@gmail.com> <461D4847.4070602@softsynth.com> <46214BBB.1030408@softsynth.com> <541D8472-D537-4485-B9D8-7E229D001CB8@gmail.com> <2AC43822-E2A8-4F46-B9E4-8DA3B72CC6C5@ibiblio.org> <296849BF-FFCE-4665-AFFB-632F22441597@gmail.com> <4623A672.9060502@softsynth.com> Message-ID: On Apr 16, 2007, at 9:38 AM, jsyn@music.columbia.edu wrote: > > >> You, sir, need to install the XCode tools > > Thanks for the tip! I updated the online docs. You're very welcome. I've started working with integrating JSyn into a Cocoa-Java application (Brad's jlooch). I've got the basics working (it makes noises, and you can twiddle the dials and change things); just need to get a few more things worked out (like putting an icon on it, help files, and saving/restoring state) and it'll be a great tutorial, plus it makes great music. (Thanks again, Brad!) The Cocoa part is actually a lot less trouble than setting up a Java UI, because 90% of it's done in Interface Builder, where you drag and drop the UI elements in place, and then connect them to method calls in a class. Dead simple. Anyway, I'll drop a URL to the list once I've finished both the application and the tutorial. It's unfortunate that Apple's deprecated the Java-Cocoa bridge, because it works so well for JSyn! --- Joe M. From jsyn at music.columbia.edu Mon Apr 16 14:56:12 2007 From: jsyn at music.columbia.edu (jsyn@music.columbia.edu) Date: Mon Apr 16 14:35:49 2007 Subject: [jsyn] hello, can you please help me? In-Reply-To: <461D4847.4070602@softsynth.com> References: <368535A1-B92A-4F80-8AD0-B3AF23247A32@gmail.com> <4617CB75.1040700@softsynth.com> <96604979-9F0C-49C1-8B92-D6FB9D356DE1@gmail.com> <461D4847.4070602@softsynth.com> Message-ID: ok, finally I got my working envPlayer, now I need to pass new random values to envPlayer every queue. I tried something like: //////// Random r = new Random(); double[] envelope1Data = { 1.0, 0.0, 1.0, 0.8, 1.0, 0.8, 1.0, 0.0, }; envelope1 = new SynthEnvelope( envelope1Data ) envPlay1.envelopePort.clear(); // clear the queue for (int j = 0 ; j < 7 ; j++) { envelope1Data[0] = r.nextFloat() * 4; envelope1Data[3] = r.nextFloat(); envelope1Data[5] = r.nextFloat(); Pitch = (Math.random() * 400) + 100; envelope1.write( 0, envelope1Data, 0, 4 ); envPlay1.envelopePort.queue( envelope1, 0, 4 ); // queue loop } ///////// but it always returns the same values so it's cleary the wrong way.. (same if I use queueLoop, I guess) any keyword or hint to let me one step ahead? thank you. Toni Il giorno 11/apr/07, alle ore 22:42, jsyn@music.columbia.edu ha scritto: > Hello Antonio, > > > but how? do you mean to build fixed values EnvPlayer with wire > and then > > You can build circuits either with Wire, or by hand. Wire helps you > keep track of the connections. > > > save as java and modify the code just by adding some math.rand? > > would this be possible? > > Once you have a circuit with the envelope player then you can queue > () parts of the envelope whenever you want. > > You can create random envelope. A description of envelope usage is > here: > > http://www.softsynth.com/jsyn/tutorial/envelopes.html > > > JSyn mailing list > JSyn@music.columbia.edu > To change digest mode or to make other administrative changes visit: > http://music.columbia.edu/mailman/listinfo/jsyn From jsyn at music.columbia.edu Mon Apr 16 15:48:00 2007 From: jsyn at music.columbia.edu (jsyn@music.columbia.edu) Date: Mon Apr 16 15:47:00 2007 Subject: [jsyn] random envelope values In-Reply-To: References: <368535A1-B92A-4F80-8AD0-B3AF23247A32@gmail.com> <4617CB75.1040700@softsynth.com> <96604979-9F0C-49C1-8B92-D6FB9D356DE1@gmail.com> <461D4847.4070602@softsynth.com> Message-ID: <4623D2F0.1060902@softsynth.com> Hello Toni, When you ask a question, please put the topic in the subject line. That will help people find answers in the archives. Note that I changed the subject to "random envelope values". I think what is happening is that there is only one copy of the envelope data. So you are modifying it after it has been queued. You need to create a new SynthEnvelope each time through the loop. for (int j = 0 ; j < 7 ; j++) { envelope1Data[0] = r.nextFloat() * 4; envelope1Data[3] = r.nextFloat(); etcetera... SynthEnvelope envelope1 = new SynthEnvelope( envelope1Data ) envPlay1.envelopePort.queue( envelope1 ); envelope1.delete(); } You can safely delete() it because resources are tracked . The actual deletion will not take place until the envelope data has finished being played. Thank you, Phil Burk --------------------------------------- SoftSynth, Audio Research and Development http://www.softsynth.com/ 75 Pleasant Lane, San Rafael, CA, 94901 USA Phone/FAX: 1-415-453-4320 --------------------------------------- jsyn@music.columbia.edu wrote: > ok, > finally I got my working envPlayer, now I need to pass new random values > to envPlayer every queue. > I tried something like: > > //////// > > Random r = new Random(); > double[] envelope1Data = { > 1.0, 0.0, > 1.0, 0.8, > 1.0, 0.8, > 1.0, 0.0, > }; > > envelope1 = new SynthEnvelope( envelope1Data ) > > envPlay1.envelopePort.clear(); // clear the queue > > for (int j = 0 ; j < 7 ; j++) { > envelope1Data[0] = r.nextFloat() * 4; > envelope1Data[3] = r.nextFloat(); > envelope1Data[5] = r.nextFloat(); > Pitch = (Math.random() * 400) + 100; > > envelope1.write( 0, envelope1Data, 0, 4 ); > envPlay1.envelopePort.queue( envelope1, 0, 4 ); // > queue loop > } > > ///////// > > but it always returns the same values so it's cleary the wrong way.. > (same if I use queueLoop, I guess) > any keyword or hint to let me one step ahead? > > thank you. > > Toni > > > > > > Il giorno 11/apr/07, alle ore 22:42, jsyn@music.columbia.edu ha scritto: > >> Hello Antonio, >> >> > but how? do you mean to build fixed values EnvPlayer with wire and then >> >> You can build circuits either with Wire, or by hand. Wire helps you >> keep track of the connections. >> >> > save as java and modify the code just by adding some math.rand? >> > would this be possible? >> >> Once you have a circuit with the envelope player then you can queue() >> parts of the envelope whenever you want. >> >> You can create random envelope. A description of envelope usage is here: >> >> http://www.softsynth.com/jsyn/tutorial/envelopes.html >> >> >> JSyn mailing list >> JSyn@music.columbia.edu >> To change digest mode or to make other administrative changes visit: >> http://music.columbia.edu/mailman/listinfo/jsyn > > _______________________________________________ > JSyn mailing list > JSyn@music.columbia.edu > To change digest mode or to make other administrative changes visit: > http://music.columbia.edu/mailman/listinfo/jsyn > > From jsyn at music.columbia.edu Mon Apr 16 16:09:31 2007 From: jsyn at music.columbia.edu (jsyn@music.columbia.edu) Date: Mon Apr 16 16:43:25 2007 Subject: [jsyn] DSP Algorithms Message-ID: <777FEC10-C43B-4CFB-B888-5CB40C9C6FDA@oberlin.edu> Hey guys, Do any of you know a good repository of detailed information in DSP algorithms. I am thinking of something similar to Cormen's book on algorithms but with a focus on DSP. Thanks a lot! wes From jsyn at music.columbia.edu Mon Apr 16 18:12:26 2007 From: jsyn at music.columbia.edu (jsyn@music.columbia.edu) Date: Mon Apr 16 18:44:42 2007 Subject: [jsyn] DSP Algorithms In-Reply-To: <777FEC10-C43B-4CFB-B888-5CB40C9C6FDA@oberlin.edu> References: <777FEC10-C43B-4CFB-B888-5CB40C9C6FDA@oberlin.edu> Message-ID: <4623F4CA.2050803@softsynth.com> > Do any of you know a good repository of detailed information in DSP > algorithms. I am thinking of something similar to Cormen's book on These links may help: http://www.musicdsp.org/archive.php http://www.softsynth.com/links/dsp_theory.html http://www.akpeters.com/product.asp?ProdCode=1047 Thank you, Phil Burk From jsyn at music.columbia.edu Tue Apr 17 17:02:26 2007 From: jsyn at music.columbia.edu (jsyn@music.columbia.edu) Date: Tue Apr 17 17:42:49 2007 Subject: [jsyn] random envelope values In-Reply-To: <4623D2F0.1060902@softsynth.com> References: <368535A1-B92A-4F80-8AD0-B3AF23247A32@gmail.com> <4617CB75.1040700@softsynth.com> <96604979-9F0C-49C1-8B92-D6FB9D356DE1@gmail.com> <461D4847.4070602@softsynth.com> <4623D2F0.1060902@softsynth.com> Message-ID: <5F5E8714-0F1E-4A8C-8C7F-EAC44BF2E2BE@gmail.com> > You need to create a new SynthEnvelope each time through the loop. > > for (int j = 0 ; j < 7 ; j++) { > envelope1Data[0] = r.nextFloat() * 4; > envelope1Data[3] = r.nextFloat(); > etcetera... > > SynthEnvelope envelope1 = new SynthEnvelope( envelope1Data ) > envPlay1.envelopePort.queue( envelope1 ); > envelope1.delete(); > } > > You can safely delete() it because resources are tracked . The > actual deletion will not take place until the envelope data has > finished being played. Thank you again and again Phil, now it works!! Just one more thing before I promise I won't stress you this much any longer :-/ I suppose I can't pass new frequencies at every queue, unless I structure the code in another way, right? Infact I tried with nesting the sineOscillator in the: for (int j = 0 ; j < 7 ; j++) { SineOscillator sinOsc1 = new SineOscillator(); envelope1 = new SynthEnvelope( envelope1Data ); envPlay1.envelopePort.queue( envelope1, 0, 4 ); sinOsc1.frequency.set(r.nextFloat()*300 + 100); envelope1.delete(); sinOsc1.delete(); } but not! then I realized that to keep the envelope with random values as single event and loop it it would be a better solution. infact when I run my application it works, I just need to loop it.. grazie Antonio p.s. any chance for a JSyn workshop around here in Italy? :-) From jsyn at music.columbia.edu Tue Apr 17 19:58:19 2007 From: jsyn at music.columbia.edu (jsyn@music.columbia.edu) Date: Tue Apr 17 20:02:42 2007 Subject: [jsyn] random envelope values In-Reply-To: <5F5E8714-0F1E-4A8C-8C7F-EAC44BF2E2BE@gmail.com> References: <368535A1-B92A-4F80-8AD0-B3AF23247A32@gmail.com> <4617CB75.1040700@softsynth.com> <96604979-9F0C-49C1-8B92-D6FB9D356DE1@gmail.com> <461D4847.4070602@softsynth.com> <4623D2F0.1060902@softsynth.com> <5F5E8714-0F1E-4A8C-8C7F-EAC44BF2E2BE@gmail.com> Message-ID: <46255F1B.3030005@softsynth.com> Hello Antonio, > I suppose I can't pass new frequencies at every queue, unless I > structure the code in another way, right? You can use timestamps to schedule the change in frequency to occur in the future, at the same time as the envelope change. osc.frequency.set( timestamp, freq ); http://www.softsynth.com/jsyn/tutorial/time_scheduling.html > any chance for a JSyn workshop around here in Italy? :-) I might be in Torino in September! Where are you in Italy? Thank you, Phil Burk --------------------------------------- SoftSynth, Audio Research and Development http://www.softsynth.com/ 75 Pleasant Lane, San Rafael, CA, 94901 USA Phone/FAX: 1-415-453-4320 --------------------------------------- From jsyn at music.columbia.edu Wed Apr 18 15:42:12 2007 From: jsyn at music.columbia.edu (jsyn@music.columbia.edu) Date: Wed Apr 18 15:21:42 2007 Subject: [jsyn] random envelope values In-Reply-To: <46255F1B.3030005@softsynth.com> References: <368535A1-B92A-4F80-8AD0-B3AF23247A32@gmail.com> <4617CB75.1040700@softsynth.com> <96604979-9F0C-49C1-8B92-D6FB9D356DE1@gmail.com> <461D4847.4070602@softsynth.com> <4623D2F0.1060902@softsynth.com> <5F5E8714-0F1E-4A8C-8C7F-EAC44BF2E2BE@gmail.com> <46255F1B.3030005@softsynth.com> Message-ID: <7A90AFD8-217B-431A-80CA-23D5662D0950@gmail.com> Il giorno 18/apr/07, alle ore 01:58, jsyn@music.columbia.edu ha scritto: > Hello Antonio, > > You can use timestamps to schedule the change in frequency to occur > in the future, at the same time as the envelope change. > > osc.frequency.set( timestamp, freq ); > > http://www.softsynth.com/jsyn/tutorial/time_scheduling.html I got it!! everything works fine :-) thank you sir, and all JSyners who helped me in the process. > > > any chance for a JSyn workshop around here in Italy? :-) > > I might be in Torino in September! Where are you in Italy? > I live in Udine, in the north east, 100 km from Venice and 50 from the slovenian border. September might be a busy period, but if I'll have the chance I'll be very happy to meet you. Keep me informed about your italian/european plans, via the list or eventually: toni@opere.com skype: antonioDM Thank you for developing JSyn. Antonio __________________ http://www.fades.net __________________ From jsyn at music.columbia.edu Sun Apr 22 23:56:27 2007 From: jsyn at music.columbia.edu (jsyn@music.columbia.edu) Date: Mon Apr 23 00:37:57 2007 Subject: [jsyn] JSyn applet stop Message-ID: Hello Phil, my applet's sound doesn't stop when i close the window, it ignores the stop/stopEngine/whatever method.. It generates a loop by qeueing envelopes in a "while" cycle. Maybe the solution is in making a thread? I'm looking at your tutorial file TUT_SeqBuffered as a reference because it seems to work somehow similarly. Am I right? Are there any better (easier) examples online? I'm a bit confused also because on my browsers (safari or firefox or IE for MacOSX) I only hear the sound of SeqBuffered, but I don't see any fader that seems to be there in the code... thank you Antonio From jsyn at music.columbia.edu Mon Apr 23 07:05:01 2007 From: jsyn at music.columbia.edu (jsyn@music.columbia.edu) Date: Mon Apr 23 07:23:51 2007 Subject: [jsyn] newbie question: JSyn for building samplers Message-ID: Hello, this is a newbie question. I'm trying to work out the suitability of JSyn for my purposes and I apologise if I've missed the answers in previous posts or documentation. I want to build realtime controllable sampler objects capable of varispeed playback, arbitrary looping rules (backwards and forwards), with arbitrary start points in the sample, and the possibility of granular playback of samples. That kind of stuff. However, unless I've missed something I don't seem to be able to chose an arbitrary playback point in a buffer, and I can't have a varispeed buffer in stereo. Is that correct? If so will future versions of JSyn make improvements on its sample playback capabilities? Otherwise, can anyone recommend the best way to work with CPU efficient sample-based music applications whilst working in Java. Ollie Bown From jsyn at music.columbia.edu Mon Apr 23 07:12:19 2007 From: jsyn at music.columbia.edu (jsyn@music.columbia.edu) Date: Mon Apr 23 07:29:11 2007 Subject: [jsyn] JSyn applet stop In-Reply-To: References: Message-ID: <462C9493.1000209@mail.rockefeller.edu> Hello Antonio Does your Applet's public void stop() method contain Synth.stopEngine() ? What is the condition for the while loop to break out? Does it run forever? Does it sleep or run as fast as possible? If you want to create a loop have you looked at queueLoop() instead of using a while loop? Yes, a Thread would be a good way to implement continuous real-time updated calls to queue(), but TUT_SeqBuffered is more than you need. You might just need to sleep - queue - sleep -queue in your Runnable's run() method. Thanks Nick Didkovsky jsyn@music.columbia.edu wrote: > Hello Phil, > my applet's sound doesn't stop when i close the window, it ignores the > stop/stopEngine/whatever method.. > It generates a loop by qeueing envelopes in a "while" cycle. Maybe the > solution is in making a thread? > I'm looking at your tutorial file TUT_SeqBuffered as a reference > because it seems to work somehow similarly. Am I right? > Are there any better (easier) examples online? > I'm a bit confused also because on my browsers (safari or firefox or > IE for MacOSX) I only hear the sound of SeqBuffered, but I don't see > any fader that seems to be there in the code... > > thank you > > Antonio > _______________________________________________ > JSyn mailing list > JSyn@music.columbia.edu > To change digest mode or to make other administrative changes visit: > http://music.columbia.edu/mailman/listinfo/jsyn From jsyn at music.columbia.edu Mon Apr 23 10:09:04 2007 From: jsyn at music.columbia.edu (jsyn@music.columbia.edu) Date: Mon Apr 23 10:09:26 2007 Subject: [jsyn] newbie question: JSyn for building samplers In-Reply-To: References: Message-ID: <462CBE00.8090805@mail.rockefeller.edu> Hello Ollie Your SampleReader's samplePort supports the *queue*(SynthSample sample, int startFrame, int numFrames) which addresses your need to play back arbitrary portions of your sample, including granular playback. Varispeed playback is not currently possible in stereo, you are correct. To play backwards you can either make a copy of the sample data and reverse it and play with queue(), or load a waveshaper's table with the sample data, and drive it with a signal that falls from 1 to -1. Using this waveshaper model will also let you play arbitrary parts of the sample table in both directions and at various speeds, depending on the driver signal. If you used an envelope to drive the waveshaper, you could specify exactly which portion to play, direction, and speed. This might be a more general solution to what you need. Thanks Nick Didkovsky jsyn@music.columbia.edu wrote: > Hello, this is a newbie question. I'm trying to work out the > suitability of JSyn for my purposes and I apologise if I've missed the > answers in previous posts or documentation. > > I want to build realtime controllable sampler objects capable of > varispeed playback, arbitrary looping rules (backwards and forwards), > with arbitrary start points in the sample, and the possibility of > granular playback of samples. That kind of stuff. However, unless I've > missed something I don't seem to be able to chose an arbitrary > playback point in a buffer, and I can't have a varispeed buffer in > stereo. Is that correct? If so will future versions of JSyn make > improvements on its sample playback capabilities? Otherwise, can > anyone recommend the best way to work with CPU efficient sample-based > music applications whilst working in Java. > > Ollie Bown > _______________________________________________ > JSyn mailing list > JSyn@music.columbia.edu > To change digest mode or to make other administrative changes visit: > http://music.columbia.edu/mailman/listinfo/jsyn From jsyn at music.columbia.edu Mon Apr 23 18:48:41 2007 From: jsyn at music.columbia.edu (jsyn@music.columbia.edu) Date: Mon Apr 23 18:28:04 2007 Subject: [jsyn] JSyn applet stop In-Reply-To: <462C9493.1000209@mail.rockefeller.edu> References: <462C9493.1000209@mail.rockefeller.edu> Message-ID: <77BF99F2-1F0A-419E-A7C1-63F2275F16AF@gmail.com> Hi Nick, > Hello Antonio > Does your Applet's public void stop() method contain > Synth.stopEngine() ? yes. > What is the condition for the while loop to break out? Does it run > forever? Does it sleep or run as fast as possible? well, actually there is no condition, I need an infinite loop. I used while because I thought that by changing the boolean value in the stop () method the cycle would break, but it's not. The cycle is like: while (go) { (...) - here I assign new random envelope data and new random freq double duration = envelope1Data[0] + envelope1Data[2] ...etc int time = Synth.getTickCount(); time += (int) ( duration ) * rate; envelope1 = new SynthEnvelope( envelope1Data ); sinOsc1.frequency.set(newaRandFreq); envPlay1.envelopePort.queue(envelope1, 0, 4 ); Synth.sleepUntilTick( time ); envelope1.delete(); } (I don't need strictly precise timecode) > If you want to create a loop have you looked at queueLoop() instead > of using a while loop? because I need to change the envelope data at every queue > Yes, a Thread would be a good way to implement continuous real-time > updated calls to queue(), but TUT_SeqBuffered is more than you > need. You might just need to sleep - queue - sleep -queue in your > Runnable's run() method. hm... I see, infact it's not easy to understand from a beginner... anyway. So the code above is to be included in the run()..? thank you, ciao Antonio