Scroller demo for Javascript/Max For Live.

a place to share your patches and get help with the Max/MSP Dev. Kit.
TomSwirly
Posts: 79
Joined: Sun Aug 07, 2011 9:04 am

Scroller demo for Javascript/Max For Live.

Postby TomSwirly » Tue Aug 09, 2011 4:33 pm

Hello!

I now have a patch showing how to do smooth scrolling at a variable speed on the Softstep, you can download it here: http://ax.to/scrollr, and see the code here http://ax.to/jsmax.

Note that there's both a Max patch and a Max For Live patch!

Have fun with it, and let me know how it works for you.
User avatar
Macciza
Posts: 157
Joined: Mon Jan 31, 2011 6:23 pm
Location: Sydney, Australia

Re: Scroller demo for Javascript/Max For Live.

Postby Macciza » Tue Aug 09, 2011 5:29 pm

Hi
Nice - though it would be great to have an addressable text input field . . .
And the M4L device fails to load into the Max editor from Live for me -8.2.2
bpatcher: bpatcher: error loading patcher scrollr.maxpat
Copied .amxd and .jso to max midi effect folder in Live . . .

I guess I will have to invest a lot more time in JS soon . . ..

Cheers
MM
KMI StringPort_1650, SoftStep_VK2 v1.2 & MIDI Expander; Mac_Moore Guitar,
Roland VG 8, 88 & 99, YamahaVL 70m; OSX 10.6.8, iMac i7 2.8G QC; MaxMSP 5.1.8, Ableton Live 8.2.2, M4L, SC3, QC, cSound, etc, etc,
TomSwirly
Posts: 79
Joined: Sun Aug 07, 2011 9:04 am

Re: Scroller demo for Javascript/Max For Live.

Postby TomSwirly » Tue Aug 09, 2011 6:50 pm

> it would be great to have an addressable text input field . . .

The next version will jump past that to something even more useful I hope... stay tuned, probably later tonight!

> And the M4L device fails to load into the Max editor from Live for me -8.2.2
bpatcher: bpatcher: error loading patcher scrollr.maxpat

Urg, I could have guess this would be an issue. Max For Live is very annoying when it comes to patches. There's some way to package a M4L patch and its parts, right?

I simply make my development directory "/Users/$USER/Library/Application Support/Ableton/Library/Presets/MIDI Effects/Max Midi Effects", make sure it's symlinked to my development directory, put a git directory in there, and I'm good to go on every machine I use.

But that's... aggressive. :-D
TomSwirly
Posts: 79
Joined: Sun Aug 07, 2011 9:04 am

Re: Scroller demo for Javascript/Max For Live.

Postby TomSwirly » Tue Aug 09, 2011 10:25 pm

All right!

I added the last feature to my scroller code, and to the demo - a queue of strings to scroll. This is going to be very handy for me when I do something and want the program to scroll the current information and then go back to where it was before.

Message format:
queue [msg] [number-of-loops] [period]

where:
msg: is a string with the message.
number-of-loops: is the number of times to repeat
period: is the time between changes to the display (in ms).

There's a nice special case where if number-of-loops is 0, then the current message loops until there are more items remaining in the queue.
User avatar
Macciza
Posts: 157
Joined: Mon Jan 31, 2011 6:23 pm
Location: Sydney, Australia

Re: Scroller demo for Javascript/Max For Live.

Postby Macciza » Wed Aug 10, 2011 6:44 am

Hi
Nice - Had at a look at the latest stuff you posted but the .tgz would not decrompress??
So I had a look at the other stuff in your git repos, grabbed the patches but they seemed incomplete so I cobbled something together with the textedit and an autobang system and all was fine . . . .

Then I decided to try to find the culprit and get rid of the occasional " " in seen in the Max display as it scrolled and have got things to the state that I can fairly regularly crash Live trying to alternate between two versions of patch . . . hmm

Will revert code, research more particularly js in M4L and see what happens tomorrow . . .

cheers

MM
KMI StringPort_1650, SoftStep_VK2 v1.2 & MIDI Expander; Mac_Moore Guitar,
Roland VG 8, 88 & 99, YamahaVL 70m; OSX 10.6.8, iMac i7 2.8G QC; MaxMSP 5.1.8, Ableton Live 8.2.2, M4L, SC3, QC, cSound, etc, etc,
TomSwirly
Posts: 79
Joined: Sun Aug 07, 2011 9:04 am

Re: Scroller demo for Javascript/Max For Live.

Postby TomSwirly » Wed Aug 10, 2011 11:57 am

I just tried downloading the tgz, from the link http://ax.to/scrollr, and was able to verify it. I suspect the issue is that you need to download the *raw* file if you navigate to that location through github?

The "" in the Max window are to be expected - it's just a debugging window, it doesn't actually appear in the display.

Do let me know if something is incomplete, I have one other person fiddling with this who seems to be getting my code to work, but he doesn't have the footpedal yet so... error messages always welcome!
User avatar
Macciza
Posts: 157
Joined: Mon Jan 31, 2011 6:23 pm
Location: Sydney, Australia

Re: Scroller demo for Javascript/Max For Live.

Postby Macciza » Wed Aug 10, 2011 4:00 pm

Hi Tom
Hmm - maybe I got in too early ?? The ax.to initially gave me the old vers - so I went to your gitrep and did it from there. The ax.to link now gives me your updated scrollr.tar but there is still a .tgz on front page of rep that fails decomp after right-click download.. There was also a .tar there yesterday which dld fine so used it. But no biggie got stuff working and checked out your new stuff just a minute ago.

With the textedit field I watched for CR and used it to delay trigger start and also delay clear the textedit . . .

Re: the "" - I kinda viewed them as a 'bug', they are not being put there by the comment box. It comes out of your js like that but could not find where in there they were coming from. I realise you dont see it on the pedal but find the 'there and gone' nature of them visually distracting and would prefer a cleaner view. No biggie.

Feel free to send me anything if you want me to help out with betas . . .

Cheers
MM

Cheers
MM
KMI StringPort_1650, SoftStep_VK2 v1.2 & MIDI Expander; Mac_Moore Guitar,
Roland VG 8, 88 & 99, YamahaVL 70m; OSX 10.6.8, iMac i7 2.8G QC; MaxMSP 5.1.8, Ableton Live 8.2.2, M4L, SC3, QC, cSound, etc, etc,
TomSwirly
Posts: 79
Joined: Sun Aug 07, 2011 9:04 am

Re: Scroller demo for Javascript/Max For Live.

Postby TomSwirly » Fri Feb 17, 2012 11:21 am

Hello, all!

I just wanted to say that I'm still using and updating this scroller, and I'm planning a "full release" next week (well, it's almost "next week" now, so conceivably the week after that).

It might well be that's what there now is inconsistent, I haven't checked it in six months and there have been changes. If you're interested, drop me a line now, or wait till next week!

To summarize what it does - you can scroll a message of any length through the display area left or right at any speed for any number of loops (or indefinitely) - and you can have a queue of such message/loop/speed requests too.

The new "release" won't really change much but will "productionize" this more by improving the documentation, adding some new commands that are useful in practice (particularly "clear everything now") and providing a stand-alone patch with help to encapsulate the Javascript.

Stay tuned, or if you have any requests, let me know!

Regarding the "" on the text display - the trouble happens when you send out a message that starts with one or more spaces to a text box. If you don't put the "" around it, then Max removes the spaces before it gets to the text box - if you do put the "" around it, the text box displays them.

I have an ugly but effective workaround for it which will be in the release.
TomSwirly
Posts: 79
Joined: Sun Aug 07, 2011 9:04 am

Re: Scroller demo for Javascript/Max For Live.

Postby TomSwirly » Sun Feb 19, 2012 11:08 am

An update on this!

I've discovered a better way to do everything - to bypass even the ss box to avoid re-initialization issues.

This will take me some extra time to accomplish... expect to see something at the start of March.
TomSwirly
Posts: 79
Joined: Sun Aug 07, 2011 9:04 am

Re: Scroller demo for Javascript/Max For Live.

Postby TomSwirly » Fri Mar 02, 2012 10:28 am

An update: I did deliver this yesterday, exactly at the start of March.

Unfortunately, the USB jack on my Softstep died right after I pushed the most recent version so I didn't have a chance to test it "from scratch" in a clean environment (which is what I always do for releases).

I'm pretty disciplined programmer, though, so I think there's an excellent chance it's in fine shape - it was working pretty reliably in various versions for about a week.

It's uploaded if any of you want to play with it - you can get it here: http://ax.to/softstep-download - and you can see the source here: http://ax.to/max

Return to “SoftStep Max/MSP Dev Kit forum”

Who is online

Users browsing this forum: No registered users and 1 guest

cron