hello scheme-for-max

15 views
Skip to first unread message

John Adams

unread,
May 5, 2021, 10:34:50 AM5/5/21
to scheme-for-max
Hi Folks,

I noticed Ian's post to r/modular:
https://www.reddit.com/r/modular/comments/myazhu/on_coding_your_own_sequencers_for_eurorack/

S4m is a cool idea.  I love it.  Max for Live is the Max I have.  I
was able to get one of the examples to play midi into an Ableton
instrument.  I was so happy to hear scheme play the Jupiter 8 VST.  To
use your examples in this environment, one sends the midiformat output
into a midiout object instead of a plugin.

I programmed Common Lisp professionally for several years so I
appreciate the lispy sentiments.  I feel that one of the reasons a
Lisp is strongly applicable in this area is that there is no unique
best way of expressing a musical composition. So the ability to
experiment and define new idioms is not a mere feature but part of the
process.

I can see that Max's udpreceive (so called) is a sensible way to get
things bootstrapped.  But for this to feel really good, one would like
a more conventional editor-integrated repl.  That would imply having a
tcp-enabled repl that ideally could connect to something like geiser
which seems like it may be the slime of scheme.  What do you think of
this idea?

I considered hacking some quick emacs support using an old osc module,
but I found that the w32 emacs I am using does not support udp. I can
shell out to a liblo program as you demonstrated, but I am not that
interested in a one way interaction.

I tried to build s4m with VS 2019 but ran into problems that appear to
be related to the ItemGroup xml pertaining to the c4support location.
Eventually it told me the build failed but did not provide a reason.
It did suggest that there was a bug in itself and that I could set
some "designtime" env variable to investigate further, but I gave up
instead.  I will probably take a second look at this shortly.

I was able to build example Max externals with VS 2019.

I am excited to look a little deeper and see what compositional ideas
are readily expressible and what may come to mind.

Iain Duncan

unread,
May 5, 2021, 12:20:49 PM5/5/21
to John Adams, Jonathan Arkell, scheme-for-max
Hi John, and welcome! thanks for the interest, great to have you here.
responses to points inline...

> S4m is a cool idea. I love it. Max for Live is the Max I have. I
> was able to get one of the examples to play midi into an Ableton
> instrument. I was so happy to hear scheme play the Jupiter 8 VST. To
> use your examples in this environment, one sends the midiformat output
> into a midiout object instead of a plugin.

Fantastic! I have not tested it much in the M4L environment, just
because I had other things first on the roadmap, but getting it to
work as well as we can in M4L is definitely a goal. Jonathan Arkell is
another experienced Scheme hacker (cc'd) and has been doing some work
there. This summer's main goal is the Pd port, but in addition to
that, I would love to get it working on M4L decently, even if it
requires a 3rd version for scheduler and threading differences. So
please do share any things you hit on it, but be aware you're on the
bleeding edge! Any M4L examples you cook up would be great to add to
the cookbook repo too.

> I programmed Common Lisp professionally for several years so I
> appreciate the lispy sentiments. I feel that one of the reasons a
> Lisp is strongly applicable in this area is that there is no unique
> best way of expressing a musical composition. So the ability to
> experiment and define new idioms is not a mere feature but part of the
> process.

Agreed! If you haven't checked them out, there are good books on using
s7 derived languages (and s7) for both Common Music and Nyquist with
interesting examples.

>
> I can see that Max's udpreceive (so called) is a sensible way to get
> things bootstrapped. But for this to feel really good, one would like
> a more conventional editor-integrated repl. That would imply having a
> tcp-enabled repl that ideally could connect to something like geiser
> which seems like it may be the slime of scheme. What do you think of
> this idea?

This would be great, and Jonathan was working on similar. I'm
relatively to lisps (aside from dabbling in Clojure), so the truth is
I haven't the experience of using one of these in their full glory.
Better editor integration would be great though, and again, awesome to
add to the cookbook. Jon, did you get any further on that?

>
> I tried to build s4m with VS 2019 but ran into problems that appear to
> be related to the ItemGroup xml pertaining to the c4support location.
> Eventually it told me the build failed but did not provide a reason.
> It did suggest that there was a bug in itself and that I could set
> some "designtime" env variable to investigate further, but I gave up
> instead. I will probably take a second look at this shortly.
>
> I was able to build example Max externals with VS 2019.

Right, so the truth is I am not at all a windows dev. I managed to get
it working in order to support windows with the help of Alex Harker,
and I just checked and it was VS 2019 I use. It worked for me as of
the last release earlier this year. I'm happy to help you get it
working as much as I can, but I might not be much help. I basically
hit compile and try not to change anything in the IDE, haha. It would
be great to have a "building on Windows" page though.

One thing I should mention too (I should add this to the main page) is
that I have to be quite conservative (for now) about additions to the
core, though forks are encouraged. This is just because it's my thesis
project for my Master's in Music Tech, so I need to make sure I'm
clear about what is and isn't my work. The Scheme layer on the other
hand is intended to be completely open to the community. I just say
this so you're aware it's not the sort of thing where I can take
un-discussed pull requests for big changes. Suggestions for
improvements and discussions of them on this list is absolutely
encouraged, but large changes might need to be made available as
variants to the external object, to which I have no objections. I
actually intend in the long run to clean up the code such that this is
common practice, because one of the cool things about s7 is how easy
it is to add new scheme functionality in C. I'd like ultimately for
folks to be able to add functions of their own easily and recompile
without necessarily understanding the whole thing.

That said, if you are excited about an M4L version, we could
absolutely make a fork for M4L that is more community driven. I'm
doing s4m and s4pd for my thesis, and am under no similar obligation
for S4M4L. :-)

> I am excited to look a little deeper and see what compositional ideas
> are readily expressible and what may come to mind.

Great to have you, thanks for emailing!
iain
Reply all
Reply to author
Forward
0 new messages