No internet connection
  1. Home
  2. How to

Using Prompt to get Item.map for memory locations?

By Owen Granich-Young @Owen_Granich_Young
    2022-01-24 16:56:54.510Z

    Hey @samuel_henriques ,

    So I'm obsessed with this little peice of code (been thinking about other applicaitons all weekend), and I am wondering if you can showme/helpme apply it to other uses. In particular getting the item.map for Memory locations.

    function prompt(item) {
        let prompt = sf.interaction.popupSearch({
            items: item.map(x => ({ name: x.normalizedTrackName, header: x }))
        }).item
        return prompt
    };
    

    You wrote this script for someone a while back and I've templated it and use it often. Remove Markers by Name Would it be possible instead to add a modified version of the Prompt function above but pulling the item.map of memory locations, and use the prompt output from that to run the script? (I have another template that pastes to location by name I found on the forum that'd I'd apply this to as well) Action based on Marker Names? #post-2 (Actually ALSO one of yours.)

    Just trying to have LESS buttons that do more.

    Thanks!
    Owen

    Solved in post #4, click to view
    • 5 replies
    1. samuel henriques @samuel_henriques
        2022-01-24 17:04:43.470Z

        Hey Owen, I can try to do what you ask maybe later today.

        In mean time you look like you could take advantage of the notes app from Christian, https://soundflow.org/store/notes, it's got a butch of really cool features.

        1. No rush at all! Just someting I've been musing how it'd be nice to have the ablity to pull a String from the marker names. Not really connected to making notes, but instead doing an action with the marker name.

          1. samuel henriques @samuel_henriques
              2022-01-24 17:20:52.909Z

              I think this is it

              function prompt(item) {
                  let prompt = sf.interaction.popupSearch({
                      items: item.map(x => ({ name: x["Name"] }))
                  }).item.name
                  return prompt
              };
              
              
              let memoryLocations = sf.proTools.memoryLocationsFetch().collection['List']
              
              
              let promptValue = prompt(memoryLocations)
              
              log(promptValue)
              
              Reply2 LikesSolution
              1. Too fast!

                1. samuel henriques @samuel_henriques
                    2022-01-24 17:26:54.713Z

                    Can't help it !😂😂😂