Forums > MaxMSP

Need some help in splitting some text so that I can use each token as a note

April 22, 2014 | 8:12 pm

Hello,
I would like to parse some text using REGEX, pull out all the vowels, and then use each vowel serially to play some notes. It’s going alright so far, but when I have repeated vowels I get simultaneous note output. So I need to separate the tokens so I can play notes separately.
I attached my patch so you can try it out.
Thanks,
Gregg


April 23, 2014 | 5:11 am
– Pasted Max Patch, click to expand. –

April 23, 2014 | 5:52 am
– Pasted Max Patch, click to expand. –

April 23, 2014 | 8:12 am

I have made a temporary solution by adding a function jb.iter, which allows iteration of a list at a variable rate. When I first implemented that function instead of iter, I got an "every other time" bug. I had to fix that with a delayed bang to the list 5 milliseconds after 1st bang.
Still not sure if this is the best way to break up the list but it does seem to work.
Here is the patch with the fix.

– Pasted Max Patch, click to expand. –
  • This reply was modified 5 months by  gmazel.
  • This reply was modified 5 months by  gmazel.

April 24, 2014 | 3:07 pm
– Pasted Max Patch, click to expand. –
  • This reply was modified 5 months by  keepsound.

April 24, 2014 | 4:29 pm

This is complete with another way to build the abstraction

– Pasted Max Patch, click to expand. –
  • This reply was modified 5 months by  keepsound.
  • This reply was modified 5 months by  keepsound.
  • This reply was modified 5 months by  keepsound. Reason: Some bug corrections

April 25, 2014 | 4:10 pm

Thank you keepsound. This is a nice implementation. I will study it. Do you know how I can make this patch into a Mac standalone application? I tried following the tutorial on this and I can build an application, but when I open it on a Mac that does not have Max Runtime, a terminal window opens and nothing seems to happen. Opening same app on my Mac works correctly, probably because I have Max 6 already installed. Any way to avoid the terminal window?


April 25, 2014 | 8:50 pm

Oh, yes, that’s easy! I build one for you, then make your mods.


April 25, 2014 | 9:14 pm
– Pasted Max Patch, click to expand. –
  • This reply was modified 5 months by  keepsound.
  • This reply was modified 5 months by  keepsound.
  • This reply was modified 5 months by  keepsound.

April 25, 2014 | 9:18 pm

A picture…when you build as application, make shure to select application mode and not as max collective

Attachments:
  1. Schermata-2014-04-26-a-06.16.22

April 27, 2014 | 6:19 am

Thanks so much for all of your help. The app works pretty well on my Snow Leopard Mac, but crashes on OSX Mavericks Mac that does not yet have any MAX version installed on it. I am investigating this issue today.

Process: GuidoDarezzoAlgo6 [2208]
Path: /Users/USER/Desktop/GuidoDarezzoAlgo6.app/Contents/MacOS/GuidoDarezzoAlgo6
Identifier: com.cycling74.MaxRuntime
Version: 6.0.7 [a687c3d] (6.0.7)
Code Type: X86 (Native)
Parent Process: launchd [186]
Responsible: GuidoDarezzoAlgo6 [2208]
User ID: 502

Date/Time: 2014-04-27 10:17:56.203 -0300
OS Version: Mac OS X 10.9.2 (13C1021)
Report Version: 11
Anonymous UUID: *************************C261A

Crashed Thread: 0 Dispatch queue: com.apple.main-thread

Exception Type: EXC_BAD_ACCESS (SIGBUS)
Exception Codes: KERN_PROTECTION_FAILURE at 0×0000000000000000

VM Regions Near 0:
–> __PAGEZERO 0000000000000000-0000000000001000 [ 4K] —/— SM=NUL /Users/USER/Desktop/GuidoDarezzoAlgo6.app/Contents/MacOS/GuidoDarezzoAlgo6
__TEXT 0000000000001000-000000000058d000 [ 5680K] r-x/rwx SM=COW /Users/USER/Desktop/GuidoDarezzoAlgo6.app/Contents/MacOS/GuidoDarezzoAlgo6

  • This reply was modified 4 months by  gmazel.

April 27, 2014 | 12:52 pm

Hi, I compile my apps with MaxMSP 6.1.7 that should be compatible with Maveriks OS, I don’t know what version you’re using, but pay attention to one thing: the app you compile has a unique name, so if your first app is named GuidoDarezzo.app, and you zip it and after that you have copied many zip files on your other computer or new partition, every coesistent zip file becomes a new name, aka GuidoDarezzo-1.zip, GuidoDarezzo-2.zip…etc. When you unzip this files, you get the modified names on every app, like GuidoDarezzo1.app, GuidoDarezzo2.app etc…and this don’t work because the internal paths that refer to the Folder where reside the real app, are broken.
So, first, see what is the right name of your app first, and rename the last you want to work, whit the right name if it’s different.
Last try is go use the right MaxMSP app also on the Maveriks OS, and it should work.
Best regards


April 27, 2014 | 2:32 pm

Include note increment/decrement

– Pasted Max Patch, click to expand. –

April 27, 2014 | 6:17 pm

Thank you keepsound. I found that after I recompiled using MAX 6.1.7, that the app works well on Mavericks, but it is not really a true test of the app on a Mavericks machine without Max Runtime. I have sent my app to some friendly testers and I hope they will give me some useful feedback on it.
I still need to figure out how to save default window sizes and positions so I can code my standalone to start up with the same view on each machine and even hopefully resizes and positions if opened on smaller displays.


April 27, 2014 | 9:18 pm

Max Runtime is included in every standalone app (not in the Max collective files! : files with .mxf suffix), so don’t care about it.
When you compile your app, the window size and position values are writed with the app itself. Only if other users have different screen resolutions, they become different dimensions for the app window, and if the position is with e left top edge at 0, 0 x,y, they will become it at the same as yours. Don’t put yopur app in the middle of your screen!!!!
And there’s the possibility to zoom every object on your app patch regarding the host screen resolution, but there is a great work to do,it’s not easy, and maybe you have to learn a little bit more about Max.
Ciao


April 28, 2014 | 6:19 am

This is an example.
This implementation is to due for every objetc that you have put in presentation mode in your app…
Every position is to change in his position parameters. Presentation_rect parameters are different from patching_rect parameters! This mean that what you see in your edit patch is different from the presentation view. Try changing the parameter name before and after.

– Pasted Max Patch, click to expand. –

Viewing 16 posts - 1 through 16 (of 16 total)