Skip to content

Swar is a command-line tool that converts any textual or code input into musical notes, generating MIDI files and optional music sheets. This project is ideal for creative data transmission, artistic audio encoding, or simply transforming messages into music.

License

Notifications You must be signed in to change notification settings

darshanC07/swar

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SWAR - A new way of communication

swar_demo.mp4

Swar is a command-line tool that converts any textual or code input into musical notes, generating MIDI files and optional music sheets. This project is ideal for creative data transmission, artistic audio encoding, or simply transforming messages into music.


Features

  • Converts plain text or code into musical notes
  • Generates playable .mid files from input text
  • Optionally outputs printable MusicXML sheet music
  • Supports special character encoding via custom note mapping
  • Built with a clean and modular CLI using click
  • Includes a built-in MIDI player
  • Cross-platform (works on Windows, macOS, Linux)
  • Easily installable via pip install .

Installation

To install and use Swar, ensure you have Python 3.7+ installed.

  1. Clone the repository:

    git clone https://github.com/darshanC07/swar.git
    cd swar
  2. Install the project using pip:

    pip install .
    

CLI Usage

After installation, you can run Swar from any terminal: Introduction

  swar

This prints the welcome message, logo, and basic help.

Convert Text to Music

  swar musicfy "your message here"

This creates a MIDI file named swar.mid in the current directory.

Options:
--output [filename]
Specify a custom output name (without .mid extension).

-ms
Save a MusicXML file (sheet music) along with the MIDI.

Examples:

swar musicfy "hello world" --output greeting -ms

Play a MIDI File

swar play

This plays the most recently created swar.mid file.

You can also specify a custom file (without extension):

swar play greeting

About

Swar is a command-line tool that converts any textual or code input into musical notes, generating MIDI files and optional music sheets. This project is ideal for creative data transmission, artistic audio encoding, or simply transforming messages into music.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages