Practical Music

About Practical Music

Practical Music links PDF sheet music with audio recordings. Import a PDF and MP3s, mark where each page and each line starts in the recording, then play: the pages turn themselves and the part being played is highlighted.

On this website

  • Library - your organization's books. Managers add PDFs, define the songs, add recordings and set the timing, just like in the app.
  • Play - one page in portrait, two in landscape; pages turn with the recording; tap a line to jump there. Keys: Space play/pause, ←/→ ±5 s, PageUp/PageDown turn pages, N/P next/previous song, F full display.
  • Share - lead a synchronized session, or follow whoever leads. Browsers and the apps play in sync through this website.

iPhone and iPad

No App Store needed: open this website in Safari, tap Share → Add to Home Screen. Practical Music then starts full screen like an app.

Before following a leader, tap the page once so the browser allows the recording to play by itself.

Windows, Linux and Android

The apps work on their own and on the local network. Sign in on their Online page to download your organization's books, upload changes (managers) and sync with everyone here. Downloads

Credits

Author: Russ Judge. Built with the assistance of Claude (Anthropic). Version 1.0.0.

Open source components: ASP.NET Core (MIT), PDFium (BSD-3), MailKit/MimeKit (MIT), MySqlConnector (MIT), Dapper (Apache 2.0); in the apps also Avalonia UI (MIT), LibVLC (LGPL-2.1), CommunityToolkit.Mvvm (MIT).

How it was made

These are the requests, word for word, that Russ Judge gave Claude to create Practical Music.

The original request (the apps)
Create an application that will run on Windows, Linux, and Android.  The root path to the code for this application is c:\Development\PracticalMusic.  The name of the application that I came up with is "Practical Music", but if you prefer a different name, you can change the name.

Although strong preference is for C# and .NET 10, you do not need to be limited to C# and .NET 10 If another programming language will work significantly better.  Use whatever programming language makes the most sense for this, and can be used with the computer you are currently running on--let me know if I need to install one before proceeding, however.

A user should be able to import pdf files and mp3 files.

The pdf files will contain sheet music.  Multiple songs could be in the pdf, and each song could be multiple pages.

Give the user the means to link mp3 files to the pdf files, and indicate which pages link to which mp3 files.  In addition, through the use of timing, give the user the capability to indicate what part of the mp3 links to which page.  The pages of each song will be consecutive, so the first part of the mp3 will always link to first page of the song.  Allow for the ability to link multiple mp3s to the same song in the pdf--to account for possibly different vocals or instruments.  Allow for editing, meaning give the user to add another pdf to the existing pdf, or to move which pages map to the mp3s.  Allow for drag-and-drop that allows the user to drag an mp3 onto a song, with the page the mp3 is dropped on representing the first page of the song mapping to that mp3.  Be sure to add drag-and-drop functionality for pdf files as well.  Also, give the ability to the user to mark on the pdf specific time-points that match to the mp3.

The user will need a feature to save or load this configuration. The configuration file should have two options for saving, one that includes the pdf and all mp3s, so that it can be easily transferred, and one that just uses URLs to point to pdfs and mp3s for small save-file size.

Include a feature to transfer the file of a pdf/mp3 setup to another computer running this application on the same local network, including a "blast" option to send to all computers running this application.  The application should be able to listen for that send, and prompt the user to accept or reject the sending of this.  There should also be the option to request a setup file.

Once the mp3s are properly linked on the pdf, then have a playback feature whereby the first page of a selected song is displayed along with the play button for the matching mp3.  If the display screen is in landscape, then the first two pages of the song in the pdf are displayed, and if the display screen is in portrait, the only the first page is displayed, filling the screen.  When the user hits play, the pages will automatically turn (if necessary) to match the mp3, but only the song playing will ever display.  While the song is playing, the play button will become the pause button.  Additional controls will include the ability to go to the next song or to the previous song.  Using the timing marks on the PDF the user had added, highlight the segment on the PDF that is currently playing on the matching mp3.

In addition, the user should be able to replay the mp3 at any point.  If possible, map touch-points on the pdf to specific time-points on the mp3.

Include the ability to set up connections between other devices running this application on the same local area network that allows for synchronized start of an mp3 by a single user, so that all users can follow along on the PDF being highlighted, synchronized.

On an "About" page, include my name (Russ Judge) as the author.  If you wish, you may include information that this was built with your assistance.

Include scripts for packaging this application for Windows, Linux, and android.  The Linux distribution this will be tested for is Omarchy, so be sure to prepare a package for Omarchy.

Include instructions for installing on Windows, Linux, and android.

After an initial test, if the application looks good, or is at least close to being final, the application will be put into a git source control repository.

I have a test pdf at c:\xxx, and four test mp3 files at c:\xxx.  The 4 mp3 files all map to 4 different songs in the PDF.
The request for this website
I need a way for ios devices to work for this, but I have no ios device to compile or test for, and I do not want to deal with the Apple Store.

Build a website that the Linux, Windows, and Android apps can work with, that will have the same functionality through the browser as those apps.  Make the necessary changes to those apps to allow for integration with the website.

Design the website in a way that it can be hosted anywhere--but each host will use its own database--there instance will be unique to that host.

The first host, however, where this will be set up on with be a Debian 13 server, running Apache with MariaDB.  This host will be https://practicalmusic.russjudge.com


The website will need security--username will be the email address of the user.   You will need a "Forgot Password" function.

The database will  be a MariaDB.  You will need to create all the SQL to create the database and a user for that database.  MariaDB already exists on the server this will be installed on.

Design the capability of having multiple organizations using this application.  One user may belong to multiple organization.  Each organization will set up their own books, so that a user will only be able to access books for organizations they belong to.

Only the website administrator (me) can set up a new organization.  Most likely, an organization will be a church, but it could also be a band.  Create a page that allows the administrator to set up an organization.

Users of an organization will be of two classes--one that can manage their organization's users and can maintain books and other files, and normal users that can read-only on the books.

The Windows, Linux, and Android apps can function stand-alone, including linking with other Windows, linux, and android devices.  If the web site, through the user's browser, can connect this way as well, then enable this.  However, you will need to add the ability to add username connectivity to the website, where the desktop/android application can download books and sync together with the website, and if they have the organization privilege, the can upload books.

Any connected user can become the leader of the synced playback, include users connected through a browser on the website--if this cannot be done through the browser, the set up the mechanism through the server--and provide instruction for what firewall changes may need made.

The maintainer of the organization on the website will also have the privilege of being able to add, remove, or edit other users of the organization.

The website administrator will also have full rights to do anything.

Add a way for users to sign up for the website--provide a drop-down of organizations to select, and they will need to enter their email address and contact information.  They will require approval from the user with management privilege for that organization before they can access the organization.  When approved, an email will need sent to the user to inform them that they now have access--so include code for sending out emails. From practicalmusic.russjudge.com, emails will go out on russjudge.com--however, russjudge.com currently is not able to send emails--I will need to set up something through my dns provider at dynu.com and probably some server settings--I will need instructions on how to do this.

If you have any questions or need clarification, let me know.