I'm pretty sure it can't be done but just checking.
Posted: Fri Nov 01, 2019 9:48 am
I'm working on a music type app which concentrates on the development of lyrics, not music, and I'm happy with all the text stuff etc. It works by cloning cards as new projects and putting the titles of the project into a scrolling field where a user can navigate to the project etc. etc. All the controls for manipulating everything is contained in the master card that gets cloned. But the desire to add some limited musical functionality has crept in (sound of sad violin).
I've settled on a simple label object eg. 'A' in screenshot (that strums a guitar chord on mouseDown) and to create multiple instances, are cloned. Target distribution is to experienced musicians so no chord diagrams are necessary.
on mouseDown
play GA.aif
grab me
end mouseDown
on mouseDoubleDown
clone me
set the loc of me to "756,301" ## keeps it clear of the other chords, kinda like a drop zone
end mouseDoubleDown
The 'grab' me was included to allow a user to drag it over a scrolling text field where the lyrics are double-line spaced and the 'clone' script is working as expected ie. there are multiple instances of a single chord that plays the .aif when mouseDown(ed) but they are 2 separate objects and if the text field scrolls, the chord doesn't move. I've done a fair bit of searching but I can't seem to find a way to "bind" the chord to its position in the text.
The 'loc' command is a bit messy too because the 'master' object dutifully puts the cloned object into position 'loc' but because it's now populated with the cloned object can't go to the 'loc' so skips a few pixels down and to the right instead.
A small particle of lead behind my left ear might put me out of my misery.
I've settled on a simple label object eg. 'A' in screenshot (that strums a guitar chord on mouseDown) and to create multiple instances, are cloned. Target distribution is to experienced musicians so no chord diagrams are necessary.
on mouseDown
play GA.aif
grab me
end mouseDown
on mouseDoubleDown
clone me
set the loc of me to "756,301" ## keeps it clear of the other chords, kinda like a drop zone
end mouseDoubleDown
The 'grab' me was included to allow a user to drag it over a scrolling text field where the lyrics are double-line spaced and the 'clone' script is working as expected ie. there are multiple instances of a single chord that plays the .aif when mouseDown(ed) but they are 2 separate objects and if the text field scrolls, the chord doesn't move. I've done a fair bit of searching but I can't seem to find a way to "bind" the chord to its position in the text.
The 'loc' command is a bit messy too because the 'master' object dutifully puts the cloned object into position 'loc' but because it's now populated with the cloned object can't go to the 'loc' so skips a few pixels down and to the right instead.
A small particle of lead behind my left ear might put me out of my misery.