digego / extempore

A cyber-physical programming environment
1.4k stars 127 forks source link

eval: unbound variable: bind-instrument #297

Closed aarbarr closed 4 years ago

aarbarr commented 7 years ago

I successfully cloned (github commit 1b761463e75750e978c97ff9b20ea123bd945eea) and built and ran (see details below) the client through Atom as per the instructions.

I used the following command to build it: git clone https://github.com/digego/extempore && mkdir extempore/cmake-build && cd extempore/cmake-build && cmake .. && make install

I am trying to run the following example: http://digego.github.io/extempore/time.html#scheduling-events-for-future-execution

But when I get to the second line of code:

(bind-instrument synth synth_note_c synth_fx)

, I get the following failure:

eval: unbound variable: bind-instrument

I'm sort of learning scheme/xtlang as I go along but it seems like the bind-instrument macro cannot be found. I did a search in the code and I cannot find it either. What am I missing? Can you point me to the macro definition in the code?


------------- Extempore --------------
Andrew Sorensen (c) 2010-2016
andrew@moso.com.au, @digego

ARCH           : x86_64-apple-darwin16.6.0
CPU            : broadwell
ATTRS          : -sse4a,-avx512bw,+cx16,-tbm,+xsave,-fma4,-avx512vl,+prfchw,+bmi2,+adx,-xsavec,+fsgsbase,+avx,-avx512cd,-avx512pf,-rtm,+popcnt,+fma,+bmi,+aes,+rdrnd,-xsaves,+sse4.1,+sse4.2,+avx2,-avx512er,+sse,+lzcnt,+pclmul,-avx512f,+f16c,+ssse3,+mmx,-pku,+cmov,-xop,+rdseed,+movbe,-hle,+xsaveopt,-sha,+sse2,+sse3,-avx512dq
LLVM           : 3.8.0 MCJIT
Output Device  : Audioengine B1
Input Device   :
SampleRate     : 44100
Channels Out   : 2
Channels In    : 0
Frames         : 128
Latency        : 2.8642 sec

Primary on Thread 0
---------------------------------------

Starting utility process
Trying to connect to 'localhost' on port 7098
New Client Connection
Successfully connected to remote process

Starting primary process
Trying to connect to 'localhost' on port 7099
New Client Connection
Successfully connected to remote process
Loading xtmbase library... done in 4.217324 seconds
New Client Connection
Loading xtmmath library... done in 13.226667 seconds
Loading xtmaudiobuffer library... done in 3.271111 seconds
Loading xtmaudio_dsp library... done in 27.181859 seconds
Loading xtminstruments library... done in 8.016689 seconds
sys:load notification instruments already loaded
stack-catch: ()
stack-catch: ()
stack-catch: ()
eval: unbound variable: bind-instrument
Trace:
digego commented 7 years ago

Hi Aaron,

In short, you now need to use the make-instrument macro. We changed the instrument infrastructure a little while back and I'm afraid that the documentation is woefully out of date. The examples are up to date though and my suggestion is that you start with examples/core/fmsynth.xtm.

Cheers, Andrew.

On Sat, Jul 1, 2017 at 8:44 AM, Aaron Barr notifications@github.com wrote:

I successfully cloned (github commit 1b76146 https://github.com/digego/extempore/commit/1b761463e75750e978c97ff9b20ea123bd945eea) and built and ran (see details below) the client through Atom as per the instructions.

I used the following command to build it: git clone https://github.com/digego/extempore && mkdir extempore/cmake-build && cd extempore/cmake-build && cmake .. && make install

I am trying to run the following example: http://digego.github.io/ extempore/time.html#scheduling-events-for-future-execution

But when I get to the second line of code:

(bind-instrument synth synth_note_c synth_fx)

, I get the following failure:

eval: unbound variable: bind-instrument

I'm sort of learning scheme/xtlang as I go along but it seems like the bind-instrument macro cannot be found. I did a search in the code and I cannot find it either. What am I missing? Can you point me to the macro definition in the code?

------------- Extempore -------------- Andrew Sorensen (c) 2010-2016andrew@moso.com.au, @digego

ARCH : x86_64-apple-darwin16.6.0 CPU : broadwell ATTRS : -sse4a,-avx512bw,+cx16,-tbm,+xsave,-fma4,-avx512vl,+prfchw,+bmi2,+adx,-xsavec,+fsgsbase,+avx,-avx512cd,-avx512pf,-rtm,+popcnt,+fma,+bmi,+aes,+rdrnd,-xsaves,+sse4.1,+sse4.2,+avx2,-avx512er,+sse,+lzcnt,+pclmul,-avx512f,+f16c,+ssse3,+mmx,-pku,+cmov,-xop,+rdseed,+movbe,-hle,+xsaveopt,-sha,+sse2,+sse3,-avx512dq LLVM : 3.8.0 MCJIT Output Device : Audioengine B1 Input Device : SampleRate : 44100 Channels Out : 2 Channels In : 0 Frames : 128 Latency : 2.8642 sec

Primary on Thread 0

Starting utility process Trying to connect to 'localhost' on port 7098 New Client Connection Successfully connected to remote process

Starting primary process Trying to connect to 'localhost' on port 7099 New Client Connection Successfully connected to remote process Loading xtmbase library... done in 4.217324 seconds New Client Connection Loading xtmmath library... done in 13.226667 seconds Loading xtmaudiobuffer library... done in 3.271111 seconds Loading xtmaudio_dsp library... done in 27.181859 seconds Loading xtminstruments library... done in 8.016689 seconds sys:load notification instruments already loaded stack-catch: () stack-catch: () stack-catch: () eval: unbound variable: bind-instrument Trace:

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/digego/extempore/issues/297, or mute the thread https://github.com/notifications/unsubscribe-auth/AAh3qdWX0ytpzLZBMGwzfiGEypzY08a7ks5sJXpdgaJpZM4OLHor .

aarbarr commented 7 years ago

Ok thank you.

JTriggerFish commented 6 years ago

I also cloned and built fine, setup atom etc but when trying to run fmsynth.xtm I'm getting:

------------- Extempore -------------- Andrew Sorensen (c) 2010-2016 andrew@moso.com.au, @digego

ARCH : x86_64-pc-windows-msvc-elf LLVM : 3.8.0 MCJIT Output Device : ASIO4ALL v2 Input Device : SampleRate : 48000 Channels Out : 2 Channels In : 0 Frames : 128 Latency : 0.01825 sec

Primary on Thread 0

Starting utility process Trying to connect to 'localhost' on port 7098 New Client Connection Successfully connected to remote process

Starting primary process Trying to connect to 'localhost' on port 7099 New Client Connection Successfully connected to remote process Loading xtmbase library... done in 2.773333 seconds New Client Connection sys:load notification Error: xtlang code must be compiled in the primary process. eval: unbound variable: make-instrument Trace: sys:load

digego commented 6 years ago

Make sure you connect to the 'primary process' on port 7099. It looks like you've 'connected atom' to the utility process on 7098.

On Thu, Oct 4, 2018 at 7:58 AM JTriggerFish notifications@github.com wrote:

I also cloned and built fine, setup atom etc but when trying to run fmsynth.xtm I'm getting:

------------- Extempore -------------- Andrew Sorensen (c) 2010-2016 andrew@moso.com.au, @digego https://github.com/digego

ARCH : x86_64-pc-windows-msvc-elf LLVM : 3.8.0 MCJIT Output Device : ASIO4ALL v2 Input Device : SampleRate : 48000 Channels Out : 2 Channels In : 0 Frames : 128 Latency : 0.01825 sec Primary on Thread 0

Starting utility process Trying to connect to 'localhost' on port 7098 New Client Connection Successfully connected to remote process

Starting primary process Trying to connect to 'localhost' on port 7099 New Client Connection Successfully connected to remote process Loading xtmbase library... done in 2.773333 seconds New Client Connection sys:load notification Error: xtlang code must be compiled in the primary process. eval: unbound variable: make-instrument Trace: sys:load

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/digego/extempore/issues/297#issuecomment-426817910, or mute the thread https://github.com/notifications/unsubscribe-auth/AAh3qdjx9-2OUPm3VuuA1E9XRcc02IKbks5uhTMHgaJpZM4OLHor .

JTriggerFish commented 6 years ago

You were right, thank you for the quick response ! I think I had issues the first time and then assumed I was connecting to the wrong port and got confused.

Some library loading takes a bit of time I don't know if that's expected?

Primary on Thread 0

Starting utility process Trying to connect to 'localhost' on port 7098 New Client Connection Successfully connected to remote process

Starting primary process Trying to connect to 'localhost' on port 7099 New Client Connection Successfully connected to remote process Loading xtmbase library... done in 3.026667 seconds New Client Connection Loading xtmrational library... done in 2.693333 seconds Loading xtmaudiobuffer library... done in 2.013333 seconds Loading xtmaudio_dsp library... done in 21.000000 seconds Loading xtminstruments library... done in 10.466667 seconds sys:load notification instruments already loaded SetValue: fmsynth >>> [float,float,i64,i64,float] New instrument bound as fmsynth in both scheme and xtlang Compiled: dsp >>> [float,float,i64,i64,float] zerolatency: #t

digego commented 6 years ago

yep, long load times are expected :(

This is something that I would really like to fix, but the fix isn't straightforward so for the foreseeable future we're stuck with long load times. The good news, I guess, is that we will improve load times significantly at some point in the future.

On Thu, Oct 4, 2018 at 8:42 AM JTriggerFish notifications@github.com wrote:

You were right, thank you for the quick response ! I think I had issues the first time and then assumed I was connecting to the wrong port and got confused.

Some library loading takes a bit of time I don't know if that's expected? Primary on Thread 0

Starting utility process Trying to connect to 'localhost' on port 7098 New Client Connection Successfully connected to remote process

Starting primary process Trying to connect to 'localhost' on port 7099 New Client Connection Successfully connected to remote process Loading xtmbase library... done in 3.026667 seconds New Client Connection Loading xtmrational library... done in 2.693333 seconds Loading xtmaudiobuffer library... done in 2.013333 seconds Loading xtmaudio_dsp library... done in 21.000000 seconds Loading xtminstruments library... done in 10.466667 seconds sys:load notification instruments already loaded SetValue: fmsynth >>> [float,float,i64,i64,float] New instrument bound as fmsynth in both scheme and xtlang Compiled: dsp >>> [float,float,i64,i64,float] zerolatency: #t

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/digego/extempore/issues/297#issuecomment-426827695, or mute the thread https://github.com/notifications/unsubscribe-auth/AAh3qcxtx4WIQ7vn3zaQ2q0imJ_P7ysbks5uhT1FgaJpZM4OLHor .

digego commented 6 years ago

Just FYI, if you're on windows you might like to give vscode a go.

On Thu, Oct 4, 2018 at 8:49 AM Andrew Sorensen digegoo@gmail.com wrote:

yep, long load times are expected :(

This is something that I would really like to fix, but the fix isn't straightforward so for the foreseeable future we're stuck with long load times. The good news, I guess, is that we will improve load times significantly at some point in the future.

On Thu, Oct 4, 2018 at 8:42 AM JTriggerFish notifications@github.com wrote:

You were right, thank you for the quick response ! I think I had issues the first time and then assumed I was connecting to the wrong port and got confused.

Some library loading takes a bit of time I don't know if that's expected? Primary on Thread 0

Starting utility process Trying to connect to 'localhost' on port 7098 New Client Connection Successfully connected to remote process

Starting primary process Trying to connect to 'localhost' on port 7099 New Client Connection Successfully connected to remote process Loading xtmbase library... done in 3.026667 seconds New Client Connection Loading xtmrational library... done in 2.693333 seconds Loading xtmaudiobuffer library... done in 2.013333 seconds Loading xtmaudio_dsp library... done in 21.000000 seconds Loading xtminstruments library... done in 10.466667 seconds sys:load notification instruments already loaded SetValue: fmsynth >>> [float,float,i64,i64,float] New instrument bound as fmsynth in both scheme and xtlang Compiled: dsp >>> [float,float,i64,i64,float] zerolatency: #t

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/digego/extempore/issues/297#issuecomment-426827695, or mute the thread https://github.com/notifications/unsubscribe-auth/AAh3qcxtx4WIQ7vn3zaQ2q0imJ_P7ysbks5uhT1FgaJpZM4OLHor .

JTriggerFish commented 6 years ago

Thank you ! Any particular reason ? I use both a bit for developing, I find each of them has different strengths

digego commented 6 years ago

The main reason is that I'm using vscode as my main extempore editor these days. Which simply means that the extempore mode on vscode is (arguably) more likely to be up to date.

On Thu, Oct 4, 2018 at 9:10 AM JTriggerFish notifications@github.com wrote:

Thank you ! Any particular reason ? I use both a bit for developing, I find each of them has different strengths

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/digego/extempore/issues/297#issuecomment-426833209, or mute the thread https://github.com/notifications/unsubscribe-auth/AAh3qePz3ZDvOZ5IVsEkhqs7uRmpj-ZOks5uhUPSgaJpZM4OLHor .

benswift commented 4 years ago

this should all be sorted now. the docs aren't perfect, but better than they were - let us know if there are any bits which are still out-of-date.