PDF Syncing

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

PDF Syncing

Almartin
I love this feature but I feel it isn't fully implemented yet.

I use PDF's for my scores and as you know many scores have repeat bars. So at some point in a song returning to page 1 and then back to page 2 is required.

I have tested this in QMidi and it doesn't seem to support returning to previous pages later in a song.

Is this a feature you intend to implement?

Many thanks
Al
Reply | Threaded
Open this post in threaded view
|

Re: PDF Syncing

mixage
Administrator
You're right, it's missing. Added in the wish list.
Mixage Software
www.mixagesoftware.com
support@mixagesoftware.com
Reply | Threaded
Open this post in threaded view
|

Re: PDF Syncing

Almartin
That's great.

In the mean time I'll use Midi pipe to automate Apple's Preview.
Reply | Threaded
Open this post in threaded view
|

Re: PDF Syncing

mixage
Administrator
Wow? And how do you achieve this? Just curious :-)
Mixage Software
www.mixagesoftware.com
support@mixagesoftware.com
Reply | Threaded
Open this post in threaded view
|

Re: PDF Syncing

Almartin
Not too complicated really.

I use control change 17 - 18 in a midi file to select the songs.
So CC17 would have 128 songs, then CC18 the next 128  (I have a huge repertoire.)
Then I have a CSV spread sheet which lists the songs.

17,1,A Foggy Day.pdf
17,2,As time goes by.pdf

CC16 is then used to change pages, or close the document.

Then in Midi pipe I use this script in an Applescript Trigger.

to split(someText, delimiter)
        set AppleScript's text item delimiters to delimiter
        set someText to someText's text items
        set AppleScript's text item delimiters to {""}
        return someText
end split
on runme(message)
        set songsListA to {}
        set songsListB to {}
       
        set songsFile to "<Path to CSV File>"
        set songs to paragraphs of (read POSIX file songsFile)
        repeat with nextLine in songs
                if length of nextLine is greater than 0 then
                        set splitLine to split(nextLine, ",")
                        if item 1 of splitLine = "17" then
                                copy item 2 of splitLine to the end of songsListA
                        else
                                copy item 2 of spliLine to the end of songsListB
                        end if
                end if
        end repeat
        tell application "Finder"
                if (item 1 of message = 191) then //Midi channel
                if (item 2 of message = 17) then
                        open document file (item (item 3 of message) of songsListA) of folder "Scores" of folder "Almartin" of folder "Desktop" of folder "allan" of folder "Users" of startup disk
                        delay 0.1
                        tell application "System Events"
                                set frontmost of process "Preview" to true
                                keystroke "f" using {control down, command down} //full screen
                        end tell
                end if
                if (item 2 of message = 18) then
                        open document file (item (item 3 of message) of songsListB) of folder "Scores" of folder "Almartin" of folder "Desktop" of folder "allan" of folder "Users" of startup disk
                        tell application "System Events"
                                set frontmost of process "Preview" to true
                                keystroke "f" using {control down, command down}
                        end tell
                end if
               
        end if
        if (item 2 of message = 16) then
                if (item 3 of message = 0) then  //close the pdf
                        tell application "System Events"
                                set frontmost of process "Preview" to true
                                keystroke "w" using {command down}
                        end tell
                end if

                if (item 3 of message > 0) then //Goto a page number.
                        tell application "System Events"
                                set frontmost of process "Preview" to true
                                keystroke "g" using {option down, command down}
                                keystroke item 3 of message
                                delay 0.1
                                keystroke return
                        end tell
                end if
        end if
        end tell
end runme

This works but only if my CSV file is up to date. I would much rather have Qmidi do the page automation if at all possible.
Reply | Threaded
Open this post in threaded view
|

Re: PDF Syncing

mixage
Administrator
In reply to this post by Almartin
W O W !!!
Mixage Software
www.mixagesoftware.com
support@mixagesoftware.com