Lawrence  Lesch

Lawrence Lesch

1675406340

Basic-pitch: A Lightweight Yet Powerful Audio-to-MIDI Converter

Basic Pitch

Basic Pitch is a Python library for Automatic Music Transcription (AMT), using lightweight neural network developed by Spotify's Audio Intelligence Lab. It's small, easy-to-use, pip install-able and npm install-able via its sibling repo.

Basic Pitch may be simple, but it's is far from "basic"! basic-pitch is efficient and easy to use, and its multipitch support, its ability to generalize across instruments, and its note accuracy competes with much larger and more resource-hungry AMT systems.

Provide a compatible audio file and basic-pitch will generate a MIDI file, complete with pitch bends. Basic pitch is instrument-agnostic and supports polyphonic instruments, so you can freely enjoy transcription of all your favorite music, no matter what instrument is used. Basic pitch works best on one instrument at a time.

Research Paper

This library was released in conjunction with Spotify's publication at ICASSP 2022. You can read more about this research in the paper, A Lightweight Instrument-Agnostic Model for Polyphonic Note Transcription and Multipitch Estimation.

If you use this library in academic research, consider citing it:

@inproceedings{2022_BittnerBRME_LightweightNoteTranscription_ICASSP,
  author= {Bittner, Rachel M. and Bosch, Juan Jos\'e and Rubinstein, David and Meseguer-Brocal, Gabriel and Ewert, Sebastian},
  title= {A Lightweight Instrument-Agnostic Model for Polyphonic Note Transcription and Multipitch Estimation},
  booktitle= {Proceedings of the IEEE International Conference on Acoustics, Speech, and Signal Processing (ICASSP)},
  address= {Singapore},
  year= 2022,
}

Note that we have improved Basic Pitch beyond what was presented in this paper. Therefore, if you use the output of Basic Pitch in academic research, we recommend that you cite the version of the code that was used.

Demo

If, for whatever reason, you're not yet completely inspired, or you're just like so totally over the general vibe and stuff, checkout our snappy demo website, basicpitch.io, to experiment with our model on whatever music audio you provide!

Installation

basic-pitch is available via PyPI. To install the current release:

pip install basic-pitch

To update Basic Pitch to the latest version, add --upgrade to the above command.

Compatible Environments:

  • MacOS, Windows and Ubuntu operating systems
  • Python versions 3.7, 3.8, 3.9

Usage

Model Prediction

Command Line Tool

This library offers a command line tool interface. A basic prediction command will generate and save a MIDI file transcription of audio at the <input-audio-path> to the <output-directory>:

basic-pitch <output-directory> <input-audio-path>

To process more than one audio file at a time:

basic-pitch <output-directory> <input-audio-path-1> <input-audio-path-2> <input-audio-path-3>

Optionally, you may append any of the following flags to your prediction command to save additional formats of the prediction output to the <output-directory>:

  • --sonify-midi to additionally save a .wav audio rendering of the MIDI file
  • --save-model-outputs to additionally save raw model outputs as an NPZ file
  • --save-note-events to additionally save the predicted note events as a CSV file

To discover more parameter control, run:

basic-pitch --help

Programmatic

predict()

Import basic-pitch into your own Python code and run the predict functions directly, providing an <input-audio-path> and returning the model's prediction results:

from basic_pitch.inference import predict
from basic_pitch import ICASSP_2022_MODEL_PATH

model_output, midi_data, note_activations = predict(<input-audio-path>)
  • <minimum-frequency> & <maximum-frequency> (floats) set the maximum and minimum allowed note frequency, in Hz, returned by the model. Pitch events with frequencies outside of this range will be excluded from the prediction results.
  • model_output is the raw model inference output
  • midi_data is the transcribed MIDI data derived from the model_output
  • note_events is a list of note events derived from the model_output

predict() in a loop

To run prediction within a loop, you'll want to load the model yourself and provide predict() with the loaded model object itself to be used for repeated prediction calls, in order to avoid redundant and sluggish model loading.

import tensorflow as tf

from basic_pitch.inference import predict
from basic_pitch import ICASSP_2022_MODEL_PATH

basic_pitch_model = tf.saved_model.load(str(ICASSP_2022_MODEL_PATH))

for x in range():
    ...
    model_output, midi_data, note_activations = predict(
        <loop-x-input-audio-path>,
        basic_pitch_model,
    )
    ...

predict_and_save()

If you would like basic-pitch orchestrate the generation and saving of our various supported output file types, you may use predict_and_save instead of using predict directly:

from basic_pitch.inference import predict_and_save

predict_and_save(
    <input-audio-path-list>,
    <output-directory>,
    <save-midi>,
    <sonify-midi>,
    <save-model-outputs>,
    <save-note-events>,
)

where:

  • <input-audio-path-list> & <output-directory>
    • directory paths for basic-pitch to read from/write to.
  • <save-midi>
    • bool to control generating and saving a MIDI file to the <output-directory>
  • <sonify-midi>
    • bool to control saving a WAV audio rendering of the MIDI file to the <output-directory>
  • <save-model-outputs>
    • bool to control saving the raw model output as a NPZ file to the <output-directory>
  • <save-note-events>
    • bool to control saving predicted note events as a CSV file <output-directory>

Model Input

Supported Audio Codecs

basic-pitch accepts all sound files that are compatible with its version of librosa, including:

  • .mp3
  • .ogg
  • .wav
  • .flac
  • .m4a

Mono Channel Audio Only

While you may use stereo audio as an input to our model, at prediction time, the channels of the input will be down-mixed to mono, and then analyzed and transcribed.

File Size/Audio Length

This model can process any size or length of audio, but processing of larger/longer audio files could be limited by your machine's available disk space. To process these files, we recommend streaming the audio of the file, processing windows of audio at a time.

Sample Rate

Input audio maybe be of any sample rate, however, all audio will be resampled to 22050 Hz before processing.

Contributing

Contributions to basic-pitch are welcomed! See CONTRIBUTING.md for details.

Download Details:

Author: Spotify
Source Code: https://github.com/spotify/basic-pitch 
License: Apache-2.0 license

#typescript #python #music #lightweight #machinelearning 

Basic-pitch: A Lightweight Yet Powerful Audio-to-MIDI Converter
Royce  Reinger

Royce Reinger

1674045000

Deepjazz: Deep Learning Driven Jazz Generation using Keras & Theano!

Note: deepjazz is no longer being actively developed. It may be refactored at some point in the future. Goodbye and thank you for your interest 😢


deepjazz

Using Keras & Theano for deep learning driven jazz generation

I built deepjazz in 36 hours at a hackathon. It uses Keras & Theano, two deep learning libraries, to generate jazz music. Specifically, it builds a two-layer LSTM, learning from the given MIDI file. It uses deep learning, the AI tech that powers Google's AlphaGo and IBM's Watson, to make music -- something that's considered as deeply human.

SoundCloud
Check out deepjazz's music on SoundCloud!

Dependencies

Instructions

Run on CPU with command:

python generator.py [# of epochs]

Run on GPU with command:

THEANO_FLAGS=mode=FAST_RUN,device=gpu,floatX=float32 python generator.py [# of epochs]

Note: running Keras/Theano on GPU is formally supported for only NVIDIA cards (CUDA backend).

Note: preprocess.py must be modified to work with other MIDI files (the relevant "melody" MIDI part needs to be selected). The ability to handle this natively is a planned feature.

Author

Ji-Sung Kim
Princeton University, Department of Computer Science
hello (at) jisungkim.com

Citations

This project develops a lot of preprocessing code (with permission) from Evan Chow's jazzml. Thank you Evan! Public examples from the Keras documentation were also referenced.

Code License, Media Copyright

Code is licensed under the Apache License 2.0
Images and other media are copyrighted (Ji-Sung Kim)

Download Details:

Author: jisungk
Source Code: https://github.com/jisungk/deepjazz 
License: Apache-2.0 license

#machinelearning #theano #music #deeplearning #keras 

Deepjazz: Deep Learning Driven Jazz Generation using Keras & Theano!
Lawrence  Lesch

Lawrence Lesch

1673423467

Tonal: A Functional Music Theory Library for Javascript

Tonal

tonal is a music theory library. Contains functions to manipulate tonal elements of music (note, intervals, chords, scales, modes, keys). It deals with abstractions (not actual music or sound).

tonal is implemented in Typescript and published as a collection of Javascript npm packages.

It uses a functional programing style: all functions are pure, there is no data mutation, and entities are represented by data structures instead of objects.

Example

import { Interval, Note, Scale } from "tonal";

Note.midi("A4"); // => 60
Note.freq("a4").freq; // => 440
Note.accidentals("c#2"); // => '#'
Note.transpose("C4", "5P"); // => "G4"
Interval.semitones("5P"); // => 7
Interval.distance("C4", "G4"); // => "5P"
Scale.get("C major").notes; // =>["C", "D", "E", "F", "G", "A", "B"];

Install

Install all packages at once:

npm install --save tonal

Usage

Tonal is compatible with both ES5 and ES6 modules, and browser.

ES6 import:

import { Note, Scale } from "tonal";

ES5 require:

const { Note, Scale } = require("tonal");

Browser

You can use the browser version from jsdelivr CDN directly in your html:

<script src="https://cdn.jsdelivr.net/npm/tonal/browser/tonal.min.js"></script>
<script>
  console.log(Tonal.Key.minorKey("Ab"));
</script>

Or if you prefer, grab the minified browser ready version from the repository.

Bundle size

tonal includes all published modules.

Although the final bundle it is small, you can reduce bundle sizes even more by installing the modules individually, and importing only the functions you need.

Note that individual modules are prefixed with @tonaljs/. For example:

npm i @tonaljs/note
import { transpose } from "@tonaljs/note";
transpose("A4", "P5");

Documentation

Generally, you just need to install tonal package (before it was called @tonaljs/tonal).

The API documentation is inside README.md of each module 👇

Notes and intervals

Scales and chords

Keys, chord progressions

Time, rhythm

Utilities

Contributing

Read contributing document. To contribute open a PR and ensure:

  • If is a music theory change (like the name of a scale) link to reliable references.
  • If is a new feature, add documentation: changes to README of the affected module(s) are expected.
  • Ad tests: changes to the test.ts file of the affected module(s) are expected.
  • All tests are green

Inspiration

This library takes inspiration from other music theory libraries:

Projects using tonal

Showcase of projects that are using Tonal:

Thank you all!

Add your project here by editing this file

Download Details:

Author: Tonaljs
Source Code: https://github.com/tonaljs/tonal 

#typescript #javascript #music #functional #scale 

Tonal: A Functional Music Theory Library for Javascript
Lawson  Wehner

Lawson Wehner

1672277760

IRS: A Music Downloader That Understands Your Metadata Needs

irs: The Ironic Repositioning System

A music scraper that understands your metadata needs.

irs is a command-line application that downloads audio and metadata in order to package an mp3 with both. Extensible, the user can download individual songs, entire albums, or playlists from Spotify.

 


Usage

~ $ irs -h

Usage: irs [--help] [--version] [--install]
           [-s <song> -a <artist>]
           [-A <album> -a <artist>]
           [-p <playlist> -a <username>]

Arguments:
    -h, --help                  Show this help message and exit
    -v, --version               Show the program version and exit
    -i, --install               Download binaries to config location
    -c, --config                Show config file location
    -a, --artist <artist>       Specify artist name for downloading
    -s, --song <song>           Specify song name to download
    -A, --album <album>         Specify the album name to download
    -p, --playlist <playlist>   Specify the playlist name to download
    -u, --url <url>             Specify the youtube url to download from (for single songs only)
    -g, --give-url              Specify the youtube url sources while downloading (for albums or playlists only only)

Examples:
    $ irs --song "Bohemian Rhapsody" --artist "Queen"
    # => downloads the song "Bohemian Rhapsody" by "Queen"
    $ irs --album "Demon Days" --artist "Gorillaz"
    # => downloads the album "Demon Days" by "Gorillaz"
    $ irs --playlist "a different drummer" --artist "prakkillian"
    # => downloads the playlist "a different drummer" by the user prakkillian

Demo

asciicast

Installation

Pre-built

Just download the latest release for your platform here.

Note that the binaries right now have only been tested on WSL. They should run on most linux distros, and OS X, but if they don't please make an issue above.

From Source

If you're one of those cool people who compiles from source

  1. Install crystal-lang (https://crystal-lang.org/install/)
  2. Clone it (git clone https://github.com/cooperhammond/irs)
  3. CD it (cd irs)
  4. Build it (shards build)

Setup

  • Create a .yaml config file somewhere on your system (usually ~/.irs/)
  • Copy the following into it
binary_directory: ~/.irs/bin
music_directory: ~/Music
filename_pattern: "{track_number} - {title}"
directory_pattern: "{artist}/{album}"
client_key: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
client_secret: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
single_folder_playlist:
    enabled: true
    retain_playlist_order: true
    unify_into_album: false
  • Set the environment variable IRS_CONFIG_LOCATION pointing to that file
  • Go to https://developer.spotify.com/dashboard/
  • Log in or create an account
  • Click CREATE A CLIENT ID
  • Enter all necessary info, true or false, continue
  • Find your client key and client secret
  • Copy each respectively into the X's in your config file
  • Run irs --install and answer the prompts!

You should be good to go! Run the file from your command line to get more help on usage or keep reading!

Config

You may have noticed that there's a config file with more than a few options. Here's what they do:

binary_directory: ~/.irs/bin
music_directory: ~/Music
search_terms: "lyrics"
filename_pattern: "{track_number} - {title}"
directory_pattern: "{artist}/{album}"
client_key: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
client_secret: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
single_folder_playlist:
    enabled: true
    retain_playlist_order: true
    unify_into_album: false
  • binary_directory: a path specifying where the downloaded binaries should be placed
  • music_directory: a path specifying where downloaded mp3s should be placed.
  • search_terms: additional search terms to plug into youtube, which can be potentially useful for not grabbing erroneous audio.
  • filename_pattern: a pattern for the output filename of the mp3
  • directory_pattern: a pattern for the folder structure your mp3s are saved in
  • client_key: a client key from your spotify API application
  • client_secret: a client secret key from your spotify API application
  • single_folder_playlist/enabled: if set to true, all mp3s from a downloaded playlist will be placed in the same folder.
  • single_folder_playlist/retain_playlist_order: if set to true, the track numbers of the mp3s of the playlist will be overwritten to correspond to their place in the playlist
  • single_folder_playlist/unify_into_album: if set to true, will overwrite the album name and album image of the mp3 with the title of your playlist and the image for your playlist respectively

In a pattern following keywords will be replaced:

KeywordReplacementExample
{artist}Artist NameQueen
{title}Track TitleBohemian Rhapsody
{album}Album NameStone Cold Classics
{track_number}Track Number9
{total_tracks}Total Tracks in Album14
{disc_number}Disc Number1
{day}Release Day01
{month}Release Month01
{year}Release Year2006
{id}Spotify ID6l8GvAyoUZwWDgF1e4822w

Beware OS-restrictions when naming your mp3s.

Pattern Examples:

music_directory: ~/Music
filename_pattern: "{track_number} - {title}"
directory_pattern: "{artist}/{album}"

Outputs: ~/Music/Queen/Stone Cold Classics/9 - Bohemian Rhapsody.mp3 

 

music_directory: ~/Music
filename_pattern: "{artist} - {title}"
directory_pattern: ""

Outputs: ~/Music/Queen - Bohemian Rhapsody.mp3 

 

music_directory: ~/Music
filename_pattern: "{track_number} of {total_tracks} - {title}"
directory_pattern: "{year}/{artist}/{album}"

Outputs: ~/Music/2006/Queen/Stone Cold Classics/9 of 14 - Bohemian Rhapsody.mp3 

 

music_directory: ~/Music
filename_pattern: "{track_number}. {title}"
directory_pattern: "irs/{artist} - {album}"

Outputs: ~/Music/irs/Queen - Stone Cold Classics/9. Bohemian Rhapsody.mp3 
 

How it works

At it's core irs downloads individual songs. It does this by interfacing with the Spotify API, grabbing metadata, and then searching Youtube for a video containing the song's audio. It will download the video using youtube-dl, extract the audio using ffmpeg, and then pack the audio and metadata together into an MP3.

From the core, it has been extended to download the index of albums and playlists through the spotify API, and then iteratively use the method above for downloading each song.

It used to be in python, but

  1. I wasn't a fan of python's limited ability to distribute standalone binaries
  2. It was a charlie foxtrot of code that I made when I was little and I wanted to refine it
  3. crystal-lang made some promises and I was interested in seeing how well it did (verdict: if you're building high-level tools you want to run quickly and distribute, it's perfect)

Contributing

Any and all contributions are welcome. If you think of a cool feature, send a PR or shoot me an email. If you think something could be implemented better, please shoot me an email. If you like what I'm doing here, pretty please shoot me an email.

  1. Fork it (https://github.com/your-github-user/irs/fork)
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

Download Details:

Author: Cooperhammond
Source Code: https://github.com/cooperhammond/irs 
License: MIT license

#crystal #music #cli #metadata 

IRS: A Music Downloader That Understands Your Metadata Needs
Nat  Grady

Nat Grady

1671791177

Best 9 Ideas How to Get Free Music for Video Editing

9 ideas how to get free music for video editing intro

There are way too many videos online and almost all got music in them. Whether it is a nice chill lo-fi tune roaming in the background or a dubstep beat to introduce a section, music is everywhere. This shouldn’t surprise us, after all, one major part of video creation is being attractive. Music helps us at that since it naturally raises attention and might induce certain moods.

In today’s article, we will tell you about 9 sites where you can find free music to add to your videos. We will go through big names as well as perhaps some hidden gems.

Let’s start.

YouTube Audio Library

Many people when thinking of YouTube consider only videos made by content creators. But you’ll be glad to know that YouTube counts with a free audio library available for all users with an account. Do not worry, you can use them legally, either under Creative Commons law or not. Only some need to be named in your description before using.

This process is called “attribution”. Before telling you about its offer, note that we are referring to Youtube’s official library, and not a channel with a similar name. To access the official one, you got to enter into YouTube Studio and go to the last section on the left. You’ll find about 1.3k music tracks and 445 sound effects. You can filter the music based on title, genre, mood, and whether Attribution is required.

In total, there are 14 genres, and 10 moods to choose from. Lastly, it is noteworthy that there is no “trending” category or filter. This may be an important omission since not everyone would like to use the same exact tracks.

Amazon Music

Amazon does also offer free music, and some tracks may be totally royalty-free. But, finding them is going to be a bit more complicated. Our recommendation is to search using the traditional portal (not Amazon Music). Select “digital music” on the top search bar, on the right choose “price low to high” and you’re almost there.

Then you’ll see a lot of tracks, some require paid plans to be used, while others are free but may not be allowed to be distributed. You also Then you’ll see a lot of tracks. As we said, o use some of them you may need to pay. And though, you also count with royalty-free ones. We encourage you to read reviews, do some research, and experimenting. This especially applies if you’re using YouTube since the algorithm may give you some trouble.

In total there are 372 options, of which the type of free content we are looking for is unknown and rather small. Besides lacking “trending” category inclusion, there is no filter for mood or genre.

CCMixter

This community-based site offers thousands of original tracks that can be used in your videos without a problem. It works entirely under Creative Commons law and you only need to attribute (i.e., give credit). Some tracks have licenses that do not allow commercial u, while others are completely royalty-free. Overall, you’ll get tons of free content to use, and each track count with clear licensing specifications.

There are 3 main categories to find music for your projects, and you count with many subcategories. You can filter tracks based on the type of license, use tags search to find genres and moods. Plus, it counts with the highest-rated, editor picks, hot tracks, etc.

If you go through them for a while, you may think that there is no way there are thousands of tracks. But note that many of them are remixes, so you will not see them unless you click on a track and then go to the bottom.

Free Music Archive

One of the biggest libraries available with a very detailed explanation of CC law. Some require attribution and others are purely open for the public. You can filter them based on intended usage and CC license, among others.

In our search, we selected the filter for using tracks in videos for commercial purposes and we found 13726 tracks. There were 15 genres, as well filters for the duration and a scoring system.

The site is honestly fascinating and a really good option.

Bensound

Bensound offers a list of over 400 royalty-free tracks that work with attributions.

It counts with 8 genres and an option to sort them based on popularity, duration, and date of creation. There are also tags that you can use to navigate more specifically between options.

The permission that you get from free will be enough for YouTube content creators, even for commercial purposes. But if you’re intended to use them on another platform, we encourage you to check its FAQ first.

SoundCloud

While SoundCloud does not have official royalty-free music or library, you can still find a lot of tracks to use. Like on YouTube some users post their content online for others to use freely. You can find them with the “royalty-free” “no copyright” and other similar names.

The diversity of genres, moods, vibes, and others is very big. And for this reason, we encourage people to browse through playlists better since they tend to be well organized.

Though searching for tracks on this site is different, it is still a very good option.

Freeplay Music

Freeplay Music counts with over 50k tracks, over 12 scenes, genres, Moods, and 10 playlists. Besides, it includes a top track section, waveform, and tempo.

Though this site is very complete, there is one major caveat. Free use is restricted, in the case of YouTube, for noncommercial purposes only. If you want to monetize the video that you’re using this track on, you either got to pay this site for a license or not monetize the video.

Incompetech

Incompetech is a platform that, in the case of YouTube upload, lets you use tracks, even for commercial use, by only crediting the author.

The traditional site counts with over 600 royalty-free tracks, 23 genres, 20 feels, tempo counter, etc.

Its updated version: “Incompetech.filmmusic.io” has more to offer. It counts with keyword searcher, a new topic section, and new/different mood and genres. All these previous sections with at least 20 options (for example 20 genres). And it more than doubles the initial offer, now boasting over 1300 tracks.

Chosic

This site functions like Incompetech and others that we’ve mentioned. It lets use tracks for commercial purposes under CC law with or without attribution. Plus, it counts with great and clear licensing indication.

On the site, there are over 1100 songs with over 20 categories and moods, and 13 topics. Besides, you can see the waveform and sort by recommended, new, popular, or random.

Bonus: Epidemic Sound - Paid but Awesome

Though you got to pay a fee to access its great library of tracks, it has many special characteristics worth considering. Most importantly may be its superior offer.

It has a list of over 32000 tracks and over 60000 sound effects. The list also includes stems (individual instruments separated) and is constantly updated. Regarding moods and genres, there are over 20 moods and genres to choose from in each main category.

Access to the library and use permissions starts from 13 €/month or 15 USD /month.

Conclusion of How to Get Free Music for Video Editing

As you can tell, the offer is really broad, from curated platforms to community-based sites. Since most of these options are fine, we underline again the issue with Amazon Music and the usage restriction by Freeplay Music. And if we were to mention a top 3, FMA, CC Mixter and Incompetech would be in there.

Thanks for reading this article, we expect it has been very helpful.

Original article source at: https://www.blog.duomly.com/

#video #editing #music 

Best 9 Ideas How to Get Free Music for Video Editing
Gordon  Matlala

Gordon Matlala

1670335080

How to Add Music, Sounds, and Other Audio To A Phaser Game

If you’re building a game, you’re probably going to need audio such as sound effects and background music at some point in time. Without audio, the gameplay experience can feel quite boring, which no one wants their game to be labeled as.

I’ve recently written quite a few tutorials on the topic of game development with Phaser. We’ve seen everything from adding and animating sprites, to handling collisions between game objects.

In this tutorial, we’re going to see how to add audio to our Phaser 3.x game in the form of sound effects triggered by collisions.

To get a better idea of what we want to accomplish, take a look at the following video:

The above video takes the topics that we explored in previous tutorials and adds audio to them. If you didn’t hear any bell noises or explosion noises, make sure your speakers are on and that your browser allows for the output of sound.

We’re going to slim the example down a bit to avoid any unnecessary complexities in the tutorial. What we’re going to do is have an animated player sprite and two other game objects. When the player collides with each game object, a different sound will play. We’re not going to worry about object pooling and similar.

Create a New Phaser 3.x Game with Boilerplate Code

Before we get into the audio side of things, we need to have a project to work from. On your computer, create a new directory with an index.html file that contains the following HTML markup:

<!DOCTYPE html>
<html>
    <head>
        <script src="//cdn.jsdelivr.net/npm/phaser@3.24.1/dist/phaser.min.js"></script>
    </head>
    <body>
        <div id="game"></div>
        <script>

            const phaserConfig = {
                type: Phaser.AUTO,
                parent: "game",
                width: 1280,
                height: 720,
                backgroundColor: "#5DACD8",
                physics: {
                    default: "arcade",
                    arcade: {
                        debug: false
                    }
                },
                scene: {
                    init: initScene,
                    preload: preloadScene,
                    create: createScene,
                    update: updateScene
                }
            };

            const game = new Phaser.Game(phaserConfig);

            function initScene() { }

            function preloadScene() {
                this.load.spritesheet("plane", "plane.png", { frameWidth: 512, frameHeight: 512 });
                this.load.image("bitcoin", "bitcoin.png");
                this.load.image("obstacle", "obstacle.png");
            }

            function createScene() {

                this.anims.create({
                    key: "fly",
                    frameRate: 7,
                    frames: this.anims.generateFrameNumbers("plane", { start: 3, end: 5 }),
                    repeat: -1
                });

                this.anims.create({
                    key: "explode",
                    frameRate: 7,
                    frames: this.anims.generateFrameNumbers("plane", { start: 0, end: 2 }),
                    repeat: 2
                });

                this.plane = this.physics.add.sprite(256, 360, "plane");
                this.plane.setScale(0.3);
                this.plane.setDepth(1);
                this.plane.play("fly");

                this.bitcoin = this.physics.add.sprite(800, 360, "bitcoin");
                this.bitcoin.setScale(0.1);

                this.obstacle = this.physics.add.sprite(1100, 360, "obstacle");
                this.obstacle.setScale(0.4);

                this.physics.add.collider(this.plane, this.bitcoin, function (plane, bitcoin) {
                    bitcoin.destroy();
                });

                this.physics.add.collider(this.plane, this.obstacle, function (plane, obstacle) {
                    if (plane.anims.getCurrentKey() != "explode") {
                        plane.play("explode")
                        plane.once(Phaser.Animations.Events.SPRITE_ANIMATION_COMPLETE, () => {
                            plane.destroy();
                        })
                    }
                });

            }

            function updateScene() {
                this.bitcoin.x -= 3;
                this.obstacle.x -= 3;
            }

        </script>
    </body>
</html>

The above markup contains more than just Phaser 3.x boilerplate code. The above code is responsible for creating three sprites with arcade physics, one of which is an animated spritesheet.

If you’d like to use the game assets that I’m using, download the plane, coin, and the obstacle image files.

When the plane collides with either of the two other sprites, an event happens. Our goal will be to include audio during each of those events.

Loading and Playing Sound within the Game

Now that we have a foundation to work with in regards to our project, we can focus on the audio, which isn’t any more difficult to use than sprites in a game.

If you’d like to use my sound effects, you can download the ding which I created by tapping a bell, and the explosion which I created by whispering nonsense into a microphone. Feel free to make your own sound effects or even looping background music.

Within the preloadScene function of the index.html file, change it to look like the following:

function preloadScene() {
    this.load.spritesheet("plane", "plane.png", { frameWidth: 512, frameHeight: 512 });
    this.load.image("bitcoin", "bitcoin.png");
    this.load.image("obstacle", "obstacle.png");
    this.load.audio("ding", ["ding.mp3"]);
    this.load.audio("explosion", ["explosion.mp3"]);
}

The above code assumes that all media assets, images and audio, exist at the root of the project next to the index.html file. The audio loader accepts a file array so that you can provide the same audio file in multiple formats for compatibility. In the above example we are only providing an MP3, which should have decent compatibility, but it could always be better.

With the audio files loaded, we need to add them to our scene.

Within the createScene function of the index.html file, add the following:

function createScene() {

    // Animations ...

    ding = this.sound.add("ding", { loop: false });
    explosion = this.sound.add("explosion", { loop: false });

    // Player sprite ...
    // Coin sprite ...
    // Obstacle sprite ...

    this.physics.add.collider(this.plane, this.bitcoin, function (plane, bitcoin) {
        ding.play();
        bitcoin.destroy();
    });

    this.physics.add.collider(this.plane, this.obstacle, function (plane, obstacle) {
        if (plane.anims.getCurrentKey() != "explode") {
            explosion.play();
            plane.play("explode")
            plane.once(Phaser.Animations.Events.SPRITE_ANIMATION_COMPLETE, () => {
                plane.destroy();
            })
        }
    });

}

You’ll notice that I’ve commented out the code for animations and the adding of our sprites because we’ve already seen it. However, for both audio files, we’ve added them to our scene and defined that they should not be looped when played.

Adding the audio to the scene does not automatically play it. Instead it needs to be triggered kind of like how an animation is played on a sprite. If you look at each of the collider methods, you’ll notice that we are calling ding.play() and explosion.play() to play our sounds.

If you had background music, you could just play the audio on loop in the createScene function.

Conclusion

You just saw how to add audio to your Phaser 3.x game. While we only saw how to add short sound effects to our game that played on a trigger event, we could easily extend what we’ve done to background music.

If you were interested in extending the example to what was seen in the movie towards the top of the tutorial, check out how to pool objects in the tutorial, Object Pooling Sprites in a Phaser Game for Performance Gains.

Original article source at: https://www.thepolyglotdeveloper.com/

#music #game #javascript 

How to Add Music, Sounds, and Other Audio To A Phaser Game
Rupert  Beatty

Rupert Beatty

1668114900

A Simple MacOS Application That Will Prevent iTunes Or Apple Music

noTunes

noTunes is a macOS application that will prevent iTunes or Apple Music from launching.

Simply launch the noTunes app and iTunes/Music will no longer be able to launch. For example, when bluetooth headphones reconnect.

You can toggle the apps functionality via the menu bar icon with a simple left click.

Installation

Homebrew

brew install --cask notunes

Direct Download

noTunes-3.3.zip

Usage

Set noTunes to launch at startup

Navigate to System Preferences -> Users & Groups. Under your user, select "Login Items", click the lock on the bottom left and enter your login password to make changes. Click the plus sign (+) in the main panel and search for noTunes. Select it and click "Add".

Toggle noTunes Functionality

Left click the menu bar icon to toggle between its active states.

Enabled (prevents iTunes/Music from opening)

noTunes Enabled

Disabled (allows iTunes/Music to open)

noTunes Disabled

Hide Menu Bar Icon

Right click the menu bar icon and click Hide Icon.

Restore Menu Bar Icon

Quit noTunes, run the following command in Terminal and re-open the app:

defaults delete digital.twisted.noTunes

Quit noTunes

To quit the app either:

With menu bar icon visible

Right click the menu bar icon and click quit.

With menu bar icon hidden

Quit the app via Activity Monitor or run the following command in Terminal:

osascript -e 'quit app "noTunes"'

Set replacement for iTunes / Apple Music

Replace YOUR_MUSIC_APP with the name of your music app in the following command.

defaults write digital.twisted.noTunes replacement /Applications/YOUR_MUSIC_APP.app

Then /Applications/YOUR_MUSIC_APP.app will launch when iTunes/Music attempts to launch.

The following command will disable the replacement.

defaults delete digital.twisted.noTunes replacement

Notice

The certificate used in noTunes prior to version 3.2 is set to expire on the 14th January 2022.

To continue using noTunes please update to version 3.2 or greater.


Download Details:

Author: tombonez
Source Code: https://github.com/tombonez/noTunes 
License: MIT license

#swift #macos #music 

A Simple MacOS Application That Will Prevent iTunes Or Apple Music
Rupert  Beatty

Rupert Beatty

1668098126

PandoraPlayer: A lightweight music player for iOS, based on AudioKit

Purpose

PandoraPlayer is a lightweight music player for iOS, based on AudioKit and completely written in Swift, constructed to be fast, light and have a nice design.

Features

  •  Plays iPod music / bundle music
  •  Real-time two-channel visual equalizer
  •  Standard controls
  •  Simple API
  •  Simple & intuitive design

Supported OS & SDK Versions

  • Supported build target - iOS 9.0

Installation

CocoaPods

Add the following line in your Podfile.

pod 'PandoraPlayer'

Usage

import PandoraPlayer

let playerVC = PandoraPlayer.configure(withMPMediaItems: mediaItems)
navigationController?.present(playerVC, animated: true, completion: nil)

Demo

example-plain

Release Notes

Version 1.0

  • Release version.

Version 1.1

  • Added Xcode 9 and Swift 4 support

Contact Us

You can always contact us via github@applikey.biz We are open for any inquiries regarding our libraries and controls, new open-source projects and other ways of contributing to the community. If you have used our component in your project we would be extremely happy if you write us your feedback and let us know about it!

Download Details:

Author: ApplikeySolutions
Source Code: https://github.com/ApplikeySolutions/PandoraPlayer 
License: MIT license

#swift #audio #radio #music #ios 

PandoraPlayer: A lightweight music player for iOS, based on AudioKit
Rupert  Beatty

Rupert Beatty

1667574180

Magnetic: SpriteKit Floating Bubble Picker (inspired By Apple Music)

Magnetic

Magnetic is a customizable bubble picker like the Apple Music genre selection.

Demo GIF

Demo Video

$ pod try Magnetic

Features

  •  Adding/Removing Nodes
  •  Selection/Deselection/Removed Animations
  •  Multiple Selection
  •  Images
  •  Multiline Label
  •  Documentation

Requirements

  • iOS 13.0+ (Magnetic 3.3.x), iOS 9.0+ (Magnetic 3.2.1)
  • Swift 5 (Magnetic 3.x), Swift 4 (Magnetic 2.x), Swift 3 (Magnetic 1.x)

Usage

A Magnetic object is an SKScene.

To display, you present it from an SKView object.

import Magnetic

class ViewController: UIViewController {

    var magnetic: Magnetic?
    
    override func loadView() {
        super.loadView()
        
        let magneticView = MagneticView(frame: self.view.bounds)
        magnetic = magneticView.magnetic
        self.view.addSubview(magneticView)
    }

}

Properties

var magneticDelegate: MagneticDelegate? // magnetic delegate
var allowsMultipleSelection: Bool // controls whether you can select multiple nodes. defaults to true
var selectedChildren: [Node] // returns selected chidren

Nodes

A Node object is a SKShapeNode subclass.

Interaction

// add circular node
let node = Node(text: "Italy", image: UIImage(named: "italy"), color: .red, radius: 30)
magnetic.addChild(node)

// add custom node
let node = Node(text: "France", image: UIImage(named: "france"), color: .blue, path: path, marginScale: 1.1)
magnetic.addChild(node)

// remove node
node.removeFromParent()

Properties

var text: String? // node text
var image: UIImage? // node image
var color: UIColor // node color

Animations

override func selectedAnimation() {
    // override selected animation
}

override func deselectedAnimation() {
    // override deselected animation
}

override func removedAnimation(completion: @escaping () -> Void) {
    // override removed animation
}

Delegation

The MagneticDelegate protocol provides a number of functions for observing the current state of nodes.

func magnetic(_ magnetic: Magnetic, didSelect node: Node) {
    // handle node selection
}

func magnetic(_ magnetic: Magnetic, didDeselect node: Node) {
    // handle node deselection
}

Customization

Subclass the Node for customization.

For example, a node with an image by default:

class ImageNode: Node {
    override var image: UIImage? {
        didSet {
            texture = image.map { SKTexture(image: $0) }
        }
    }
    override func selectedAnimation() {}
    override func deselectedAnimation() {}
}

Installation

CocoaPods

To install with CocoaPods, simply add this in your Podfile:

use_frameworks!
pod "Magnetic"

Carthage

To install with Carthage, simply add this in your Cartfile:

github "efremidze/Magnetic"

Mentions

Communication

  • If you found a bug, open an issue.
  • If you have a feature request, open an issue.
  • If you want to contribute, submit a pull request.

Credits

https://github.com/igalata/Bubble-Picker

Download Details:

Author: Efremidze
Source Code: https://github.com/efremidze/Magnetic 
License: MIT license

#swift #ios #apple #animation #music 

Magnetic: SpriteKit Floating Bubble Picker (inspired By Apple Music)
Gordon  Matlala

Gordon Matlala

1667279100

Jekyll-spaceship: Jekyll Plugin for Astronauts

 🚀 Jekyll Spaceship 🚀 

Jekyll plugin for Astronauts.

Spaceship is a minimalistic, powerful and extremely customizable Jekyll plugin. It combines everything you may need for convenient work, without unnecessary complications, like a real spaceship.

Jekyll Spaceship Demo

💡 Tip: I hope you enjoy using this plugin. If you like this project, a little star for it is your way make a clear statement: My work is valued. I would appreciate your support! Thank you!

Requirements

  • Ruby >= 2.3.0

Installation

Add jekyll-spaceship plugin in your site's Gemfile, and run bundle install.

# If you have any plugins, put them here!
group :jekyll_plugins do
  gem 'jekyll-spaceship'
end

Or you better like to write in one line:

gem 'jekyll-spaceship', group: :jekyll_plugins

Add jekyll-spaceship to the plugins: section in your site's _config.yml.

plugins:
  - jekyll-spaceship

💡 Tip: Note that GitHub Pages runs in safe mode and only allows a set of whitelisted plugins. To use the gem in GitHub Pages, you need to build locally or use CI (e.g. travis, github workflow) and deploy to your gh-pages branch.

Additions for Unlimited GitHub Pages

  • Here is a GitHub Action named jekyll-deploy-action for Jekyll site deployment conveniently. 👍
  • Here is a Jekyll site using Travis to build and deploy to GitHub Pages for your references.

Configuration

This plugin runs with the following configuration options by default. Alternative settings for these options can be explicitly specified in the configuration file _config.yml.

# Where things are
jekyll-spaceship:
  # default enabled processors
  processors:
    - table-processor
    - mathjax-processor
    - plantuml-processor
    - mermaid-processor
    - polyfill-processor
    - media-processor
    - emoji-processor
    - element-processor
  mathjax-processor:
    src:
      - https://polyfill.io/v3/polyfill.min.js?features=es6
      - https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js
    config:
      tex:
        inlineMath:
          - ['$','$']
          - ['\(','\)']
        displayMath:
          - ['$$','$$']
          - ['\[','\]']
      svg:
        fontCache: 'global'
    optimize: # optimization on building stage to check and add mathjax scripts
      enabled: true # value `false` for adding to all pages
      include: []   # include patterns for math expressions checking (regexp)
      exclude: []   # exclude patterns for math expressions checking (regexp)
  plantuml-processor:
    mode: default  # mode value 'pre-fetch' for fetching image at building stage
    css:
      class: plantuml
    syntax:
      code: 'plantuml!'
      custom: ['@startuml', '@enduml']
    src: http://www.plantuml.com/plantuml/svg/
  mermaid-processor:
    mode: default  # mode value 'pre-fetch' for fetching image at building stage
    css:
      class: mermaid
    syntax:
      code: 'mermaid!'
      custom: ['@startmermaid', '@endmermaid']
    config:
      theme: default
    src: https://mermaid.ink/svg/
  media-processor:
    default:
      id: 'media-{id}'
      class: 'media'
      width: '100%'
      height: 350
      frameborder: 0
      style: 'max-width: 600px; outline: none;'
      allow: 'encrypted-media; picture-in-picture'
  emoji-processor:
    css:
      class: emoji
    src: https://github.githubassets.com/images/icons/emoji/

Usage

1. Table Usage

For now, these extended features are provided:

  • Cells spanning multiple columns
  • Cells spanning multiple rows
  • Cells text align separately
  • Table header not required
  • Grouped table header rows or data rows

Noted that GitHub filters out style property, so the example displays with the obsolete align property. But in actual this plugin outputs style property with text-align CSS attribute.

Rowspan and Colspan

^^ in a cell indicates it should be merged with the cell above.
This feature is contributed by pmccloghrylaing.

|              Stage | Direct Products | ATP Yields |
| -----------------: | --------------: | ---------: |
|         Glycolysis |          2 ATP              ||
| ^^                 |          2 NADH |   3--5 ATP |
| Pyruvaye oxidation |          2 NADH |      5 ATP |
|  Citric acid cycle |          2 ATP              ||
| ^^                 |          6 NADH |     15 ATP |
| ^^                 |          2 FADH |      3 ATP |
|                               30--32 ATP        |||

Code above would be parsed as:

StageDirect ProductsATP Yields
Glycolysis2 ATP
2 NADH3–5 ATP
Pyruvaye oxidation2 NADH5 ATP
Citric acid cycle2 ATP
6 NADH15 ATP
2 FADH23 ATP
30–32 ATP

Multiline

A backslash at end to join cell contents with the following lines.
This feature is contributed by Lucas-C.

| :    Easy Multiline   : |||
| :----- | :----- | :------ |
| Apple  | Banana | Orange  \
| Apple  | Banana | Orange  \
| Apple  | Banana | Orange
| Apple  | Banana | Orange  \
| Apple  | Banana | Orange  |
| Apple  | Banana | Orange  |

Code above would be parsed as:

Easy Multiline
Apple
Apple
Apple
Banana
Banana
Banana
Orange
Orange
Orange
Apple
Apple
Banana
Banana
Orange
Orange
AppleBananaOrange

Headerless

Table header can be eliminated.

|--|--|--|--|--|--|--|--|
|♜| |♝|♛|♚|♝|♞|♜|
| |♟|♟|♟| |♟|♟|♟|
|♟| |♞| | | | | |
| |♗| | |♟| | | |
| | | | |♙| | | |
| | | | | |♘| | |
|♙|♙|♙|♙| |♙|♙|♙|
|♖|♘|♗|♕|♔| | |♖|

Code above would be parsed as:

 
  
      
      
       
       
 
  

Cell Alignment

Markdown table syntax use colons ":" for forcing column alignment.
Therefore, here we also use it for forcing cell alignment.

Table cell can be set alignment separately.

| :        Fruits \|\| Food       : |||
| :--------- | :-------- | :--------  |
| Apple      | : Apple : | Apple      \
| Banana     |   Banana  | Banana     \
| Orange     |   Orange  | Orange     |
| :   Rowspan is 4    : || How's it?  |
|^^    A. Peach         ||   1. Fine :|
|^^    B. Orange        ||^^ 2. Bad   |
|^^    C. Banana        ||  It's OK!  |

Code above would be parsed as:

Fruits || Food
Apple
Banana
Orange
Apple
Banana
Orange
Apple
Banana
Orange
Rowspan is 4 
A. Peach 
B. Orange 
C. Banana
 
How's it?
1. Fine
2. Bad
It' OK!

Cell Markdown

Sometimes we may need some abundant content (e.g., mathjax, image, video) in Markdown table
Therefore, here we also make markown syntax possible inside a cell.

| :                   MathJax \|\| Image                 : |||
| :------------ | :-------- | :----------------------------- |
| Apple         | : Apple : | Apple                          \
| Banana        | Banana    | Banana                         \
| Orange        | Orange    | Orange                         |
| :     Rowspan is 4     : || :        How's it?           : |
| ^^     A. Peach          ||    1. ![example][cell-image]   |
| ^^     B. Orange         || ^^ 2. $I = \int \rho R^{2} dV$ |
| ^^     C. Banana         || **It's OK!**                   |

[cell-image]: https://jekyllrb.com/img/octojekyll.png "An exemplary image"

Code above would be parsed as:

MathJax || Image
Apple
Banana
Orange
Apple
Banana
Orange
Apple
Banana
Orange
Rowspan is 4 
A. Peach 
B. Orange 
C. Banana
 
How's it?
It' OK!

 

Cell Inline Attributes

This feature is very useful for custom cell such as using inline style. (e.g., background, color, font)
The idea and syntax comes from the Maruku package.

 

Following are some examples of attributes definitions (ALDs) and afterwards comes the syntax explanation:

{:ref-name: #id .cls1 .cls2}
{:second: ref-name #id-of-other title="hallo you"}
{:other: ref-name second}

An ALD line has the following structure:

  • a left brace, optionally preceded by up to three spaces,
  • followed by a colon, the id and another colon,
  • followed by attribute definitions (allowed characters are backslash-escaped closing braces or any character except a not escaped closing brace),
  • followed by a closing brace and optional spaces until the end of the line.

If there is more than one ALD with the same reference name, the attribute definitions of all the ALDs are processed like they are defined in one ALD.

An inline attribute list (IAL) is used to attach attributes to another element.
Here are some examples for span IALs:

{: #id .cls1 .cls2} <!-- #id <=> id="id", .cls1 .cls2 <=> class="cls1 cls2" -->
{: ref-name title="hallo you"}
{: ref-name class='.cls3' .cls4}

Here is an example for custom table cell with IAL:

{:color-style: style="background: black;"}
{:color-style: style="color: white;"}
{:text-style: style="font-weight: 800; text-decoration: underline;"}

|:             Here's an Inline Attribute Lists example                :||||
| ------- | ------------------ | -------------------- | ------------------ |
|:       :|:  <div style="color: red;"> &lt; Normal HTML Block > </div> :|||
| ^^      |   Red    {: .cls style="background: orange" }                |||
| ^^ IALs |   Green  {: #id style="background: green; color: white" }    |||
| ^^      |   Blue   {: style="background: blue; color: white" }         |||
| ^^      |   Black  {: color-style text-style }                         |||

Code above would be parsed as:

IALs

Additionally, here you can learn more details about IALs.

2. MathJax Usage

MathJax is an open-source JavaScript display engine for LaTeX, MathML, and AsciiMath notation that works in all modern browsers.

Some of the main features of MathJax include:

  • High-quality display of LaTeX, MathML, and AsciiMath notation in HTML pages
  • Supported in most browsers with no plug-ins, extra fonts, or special setup for the reader
  • Easy for authors, flexible for publishers, extensible for developers
  • Supports math accessibility, cut-and-paste interoperability, and other advanced functionality
  • Powerful API for integration with other web applications

2.1 Performance optimization

At building stage, the MathJax engine script will be added by automatically checking whether there is a math expression in the page, this feature can help you improve the page performance on loading speed.

2.2 How to use?

Put your math expression within $...$

$ a * b = c ^ b $
$ 2^{\frac{n-1}{3}} $
$ \int\_a^b f(x)\,dx. $

Code above would be parsed as:

MathJax Expression

3. PlantUML Usage

PlantUML is a component that allows to quickly write:

  • sequence diagram,
  • use case diagram,
  • class diagram,
  • activity diagram,
  • component diagram,
  • state diagram,
  • object diagram

There are two ways to create a diagram in your Jekyll blog page:

```plantuml!
Bob -> Alice : hello world
```

or

@startuml
Bob -> Alice : hello
@enduml

Code above would be parsed as:

PlantUML Diagram

4. Mermaid Usage

Mermaid is a Javascript based diagramming and charting tool. It generates diagrams flowcharts and more, using markdown-inspired text for ease and speed.

It allows to quickly write:

  • flow chart,
  • pie chart,
  • sequence diagram,
  • class diagram,
  • state diagram,
  • entity relationship diagram,
  • user journey,
  • gantt

There are two ways to create a diagram in your Jekyll blog page:

```mermaid!
pie title Pets adopted by volunteers
  "Dogs" : 386
  "Cats" : 85
  "Rats" : 35
```

or

@startmermaid
pie title Pets adopted by volunteers
  "Dogs" : 386
  "Cats" : 85
  "Rats" : 35
@endmermaid

Code above would be parsed as:

Mermaid Diagram

5. Media Usage

How often did you find yourself googling "How to embed a video/audio in markdown?"

While its not possible to embed a video/audio in markdown, the best and easiest way is to extract a frame from the video/audio. To add videos/audios to your markdown files easier I developped this tool for you, and it will parse the video/audio link inside the image block automatically.

For now, these media links parsing are provided:

  • Youtube
  • Vimeo
  • DailyMotion
  • Spotify
  • SoundCloud
  • General Video ( mp4 | avi | ogg | ogv | webm | 3gp | flv | mov ... )
  • General Audio ( mp3 | wav | ogg | mid | midi | aac | wma ... )

There are two ways to embed a video/audio in your Jekyll blog page:

Inline-style:

![]({media-link})

Reference-style:

![][{reference}]

[{reference}]: {media-link}

For configuring media attributes (e.g, width, height), just adding query string to the link as below:

![](https://www.youtube.com/watch?v=Ptk_1Dc2iPY?width=800&height=500)

![](https://www.dailymotion.com/video/x7tfyq3?width=100%&height=400&autoplay=1)

Youtube Usage

![](https://www.youtube.com/watch?v=Ptk_1Dc2iPY)

![](//www.youtube.com/watch?v=Ptk_1Dc2iPY?width=800&height=500)

Vimeo Usage

![](https://vimeo.com/263856289)

![](https://vimeo.com/263856289?width=500&height=320)

DailyMotion Usage

![](https://www.dailymotion.com/video/x7tfyq3)

![](https://dai.ly/x7tgcev?width=100%&height=400)

Spotify Usage

![](http://open.spotify.com/track/4Dg5moVCTqxAb7Wr8Dq2T5)

Spotify Podcast Usage

![](https://open.spotify.com/episode/31AxcwYdjsFtStds5JVWbT)

SoundCloud Usage

![](https://soundcloud.com/aviciiofficial/preview-avicii-vs-lenny)

General Video Usage

![](//www.html5rocks.com/en/tutorials/video/basics/devstories.webm)

![](//techslides.com/demos/sample-videos/small.ogv?allow=autoplay)

![](//techslides.com/demos/sample-videos/small.mp4?width=400)

General Audio Usage

![](//www.soundhelix.com/examples/mp3/SoundHelix-Song-1.mp3)

![](//www.soundhelix.com/examples/mp3/SoundHelix-Song-1.mp3?autoplay=1&loop=1)

6. Hybrid HTML with Markdown

As markdown is not only a lightweight markup language with plain-text-formatting syntax, but also an easy-to-read and easy-to-write plain text format, so writing a hybrid HTML with markdown is an awesome choice.

It's easy to write markdown inside HTML:

<script type="text/markdown">
# Hybrid HTML with Markdown is a not bad choice ^\_^

## Table Usage

| :        Fruits \|\| Food       : |||
| :--------- | :-------- | :--------  |
| Apple      | : Apple : | Apple      \
| Banana     |   Banana  | Banana     \
| Orange     |   Orange  | Orange     |
| :   Rowspan is 4    : || How's it?  |
|^^    A. Peach         ||   1. Fine :|
|^^    B. Orange        ||^^ 2. Bad   |
|^^    C. Banana        ||  It's OK!  |

## PlantUML Usage

@startuml
Bob -> Alice : hello
@enduml

## Video Usage

![](https://www.youtube.com/watch?v=Ptk_1Dc2iPY)
</script>

7. Markdown Polyfill

It allows us to polyfill features for extending markdown syntax.

For now, these polyfill features are provided:

  • Escape ordered list

7.1 Escape Ordered List

A backslash at begin to escape the ordered list.

Normal:

1. List item Apple.
3. List item Banana.
10. List item Cafe.

Escaped:

\1. List item Apple.
\3. List item Banana.
\10. List item Cafe.

Code above would be parsed as:

Normal:

1. List item Apple.
2. List item Banana.
3. List item Cafe.

Escaped:

1. List item Apple.
3. List item Banana.
10. List item Cafe.

8. Emoji Usage

GitHub-flavored emoji images and names would allow emojifying content such as: it's raining :cat:s and :dog:s!

Noted that emoji images are served from the GitHub.com CDN, with a base URL of https://github.githubassets.com, which results in emoji image URLs like https://github.githubassets.com/images/icons/emoji/unicode/1f604.png.

In any page or post, use emoji as you would normally, e.g.

I give this plugin two :+1:!

Code above would be parsed as:

I give this plugin two :+1:!

8.1 Emoji Customizing

If you'd like to serve emoji images locally, or use a custom emoji source, you can specify so in your _config.yml file:

jekyll-spaceship:
  emoji-processor:
    src: "/assets/images/emoji"

See the Gemoji documentation for generating image files.

9. Modifying Element Usage

It allows us to modify elements via CSS3 selectors. Through it you can easily modify the attributes of an element tag, replace the children nodes and so on, it's very flexible, but here is example usage for modifying a document:

# Here is a comprehensive example
jekyll-spaceship:
  element-processor:
    css:
      - a: '<h1>Test</h1>'                     # Replace all `a` tags (String Style)
      - ['a.link1', 'a.link2']:                # Replace all `a.link1`, `a.link2` tags (Hash Style)
          name: img                            # Replace element tag name
          props:                               # Replace element properties
            title: Good image                  # Add a title attribute
            src: ['(^.*$)', '\0?a=123']        # Add query string to src attribute by regex pattern
            style:                             # Add style attribute (Hash Style)
              color: red
              font-size: '1.2em'
          children:                            # Add children to the element
            -                                  # First empty for adding after the last child node
            - "<span>Google</span>"            # First child node (String Style)
            -                                  # Middle empty for wrapping the children nodes
            - name: span                       # Second child node (Hash Style)
              props:
                prop1: "1"                     # Custom property1
                prop2: "2"                     # Custom property2
                prop3: "3"                     # Custom property3
              children:                        # Add nested chidren nodes
                - "<span>Jekyll</span>"        # First child node (String Style)
                - name: span                   # Second child node (Hash Style)
                  props:                       # Add attributes to child node (Hash Style)
                    prop1: "a"
                    prop2: "b"
                    prop3: "c"
                  children: "<b>Yap!</b>"      # Add children nodes (String Style)
            -                                  # Last empty for adding before the first child node
      - a.link: '<a href="//t.com">Link</a>'   # Replace all `a.link` tags (String Style)
      - 'h1#title':                            # Replace `h1#title` tags (Hash Style)
          children: I'm a title!               # Replace inner html to new text

Example 1

Automatically adds a target="_blank" rel="noopener noreferrer" attribute to all external links in Jekyll's content.

jekyll-spaceship:
  element-processor:
    css:
      - a:                                     # Replace all `a` tags
          props:
            class: ['(^.*$)', '\0 ext-link']   # Add `ext-link` to class by regex pattern
            target: _blank                     # Replace `target` value to `_blank`
            rel: noopener noreferrer           # Replace `rel` value to `noopener noreferrer`

Example 2

Automatically adds loading="lazy" to img and iframe tags to natively load lazily. Browser support is growing. If a browser does not support the loading attribute, it will load the resource just like it would normally.

jekyll-spaceship:
  element-processor:
    css:
      - a:                                     # Replace all `a` tags
          props:                               #
            loading: lazy                      # Replace `loading` value to `lazy`

In case you want to prevent loading some images/iframes lazily, add loading="eager" to their tags. This might be useful to prevent flickering of images during navigation (e.g. the site's logo).

See the following examples to prevent lazy loading.

jekyll-spaceship:
  element-processor:
    css:
      - a:                                     # Replace all `a` tags
          props:                               #
            loading: eager                     # Replace `loading` value to `eager`

There are three options when using this method to lazy load images. Here are the supported values for the loading attribute:

  • auto: Default lazy-loading behavior of the browser, which is the same as not including the attribute.
  • lazy: Defer loading of the resource until it reaches a calculated distance from the viewport.
  • eager: Load the resource immediately, regardless of where it’s located on the page.

Credits

  • Jekyll - A blog-aware static site generator in Ruby.
  • MultiMarkdown - Lightweight markup processor to produce HTML, LaTeX, and more.
  • markdown-it-multimd-table - Multimarkdown table syntax plugin for markdown-it markdown parser.
  • jmoji - GitHub-flavored emoji plugin for Jekyll.
  • jekyll-target-blank - Automatically opens external links in a new browser for Jekyll Pages, Posts and Docs.
  • jekyll-loading-lazy - Automatically adds loading="lazy" to img and iframe tags to natively load lazily.
  • mermaid - Generation of diagram and flowchart from text in a similar manner as markdown.

Contributing

Issues and Pull Requests are greatly appreciated. If you've never contributed to an open source project before I'm more than happy to walk you through how to create a pull request.

You can start by opening an issue describing the problem that you're looking to resolve and we'll go from there.

Download Details:

Author: jeffreytse
Source Code: https://github.com/jeffreytse/jekyll-spaceship 
License: MIT license

#jekyll #music #emoji #html 

 Jekyll-spaceship: Jekyll Plugin for Astronauts
Rupert  Beatty

Rupert Beatty

1666759680

YouTube-Music: A Mac App Wrapper for Music.youtube.com

YouTube-Music

A simple Mac app wrapper using WKWebView for YouTube Music that allows YouTube Music to run as a standalone process.

Features

  • Media Keys
  • Keyboard shortcuts
  • "Now Playing" Notification Center widget
  • Touch Bar media controls and scrubber
  • System notifications when a new track plays

Installation

You can download the latest version at the following link:

Download Latest Version

The latest binary can also be found on the releases page or clone and compile in Xcode.

Homebrew

If homebrew is installed, you can also use brew install --cask yt-music

Screenshots

View More Screenshots

 

Screenshot 2 Screenshot 3 Screenshot 4

Contributing

More help in improving YouTube Music is always welcome! Please take a look at the Issues and if there's something you think you can do, please consider filing a pull request.

Requirements for Building

Building YouTube Music

  1. Clone a copy of this repo.
  2. In Terminal, cd to the repo directory and run pod install.
  3. Open YT Music.xcworkspace.
  4. Under the 'Code Signing' settings in Xcode, make sure your developer account is set for Debug builds.

Legal

Disclaimer: YT Music is an unofficial application and not affiliated with YouTube or Google Inc. in any way. "YouTube", "YouTube Music" and the "YouTube Logo" are registered trademarks of Google Inc.

Download Details:

Author: Steve228uk
Source Code: https://github.com/steve228uk/YouTube-Music 
License: MIT license

#swift #music #macos 

YouTube-Music: A Mac App Wrapper for Music.youtube.com
Rupert  Beatty

Rupert Beatty

1666747320

Now playing controller from Apple Music, Mail & Podcasts Apple's apps

SPStorkController

About

Controller as in Apple Music, Podcasts and Mail apps. Help if you need customize height or suppport modal style in iOS 12.

Simple adding close button and centering arrow indicator. Customizable height. Using custom TransitionDelegate.

Alert you can find in SPAlert project. It support diffrents presets, some animatable.

Requirements

Swift 4.2 & 5.0. Ready for use on iOS 10+

Installation

CocoaPods:

CocoaPods is a dependency manager for Cocoa projects. For usage and installation instructions, visit their website. To integrate SPStorkController into your Xcode project using CocoaPods, specify it in your Podfile:

pod 'SPStorkController'

Carthage

Carthage is a decentralized dependency manager that builds your dependencies and provides you with binary frameworks. To integrate SPStorkController into your Xcode project using Carthage, specify it in your Cartfile:

github "ivanvorobei/SPStorkController"

Swift Package Manager

The Swift Package Manager is a tool for managing the distribution of Swift code. It’s integrated with the Swift build system to automate the process of downloading, compiling, and linking dependencies.

To integrate SPStorkController into your Xcode project using Xcode 11, specify it in Project > Swift Packages:

https://github.com/ivanvorobei/SPStorkController

Manually

If you prefer not to use any of the aforementioned dependency managers, you can integrate SPStorkController into your project manually. Put Source/SPStorkController folder in your Xcode project. Make sure to enable Copy items if needed and Create groups.

Quick Start

Create controller and call func presentAsStork:

import UIKit
import SPStorkController

class ViewController: UIViewController {
    
    override func viewDidAppear(_ animated: Bool) {
        super.viewDidAppear(animated)

        let controller = UIViewController()
        self.presentAsStork(controller)
    }
}

If you want customize controller (remove indicator, set custom height and other), create controller and set transitioningDelegate to SPStorkTransitioningDelegate object. Use present or dismiss functions:

let controller = UIViewController()
let transitionDelegate = SPStorkTransitioningDelegate()
controller.transitioningDelegate = transitionDelegate
controller.modalPresentationStyle = .custom
controller.modalPresentationCapturesStatusBarAppearance = true
self.present(controller, animated: true, completion: nil)

Please, do not init SPStorkTransitioningDelegate like this:

controller.transitioningDelegate = SPStorkTransitioningDelegate()

You will get an error about weak property.

Usage

Light StatusBar

To set light status bar for presented controller, use preferredStatusBarStyle property. Also set modalPresentationCapturesStatusBarAppearance. See example:

import UIKit

class ModalViewController: UIViewController {
    
    override var preferredStatusBarStyle: UIStatusBarStyle {
        return .lightContent
    }
}

Custom Height

Property customHeight sets custom height for controller. Default is nil:

transitionDelegate.customHeight = 350

Close Button

Property showCloseButton added circle button with dismiss action. Default is false:

transitionDelegate.showCloseButton = false

Arrow Indicator

On the top of controller you can add arrow indicator with animatable states. It simple configure. Property showIndicator shows or hides top arrow indicator. Default is true:

transitionDelegate.showIndicator = true

Property Parameter indicatorColor for customize color of arrow. Default is gray:

transitionDelegate.indicatorColor = UIColor.white

Property hideIndicatorWhenScroll shows or hides indicator when scrolling. Default is false:

transitionDelegate.hideIndicatorWhenScroll = true

You can set always line or arrow indicator. Set indicatorMode:

transitionDelegate.indicatorMode = .alwaysLine

Dismissing

You can also configure events that will dimiss the controller. Property swipeToDismissEnabled enables dismissal by swipe gesture. Default is true:

transitionDelegate.swipeToDismissEnabled = true

Property translateForDismiss sets how much need to swipe down to close the controller. Work only if swipeToDismissEnabled is true. Default is 240:

transitionDelegate.translateForDismiss = 100

Property tapAroundToDismissEnabled enables dismissal by tapping parent controller. Default is true:

transitionDelegate.tapAroundToDismissEnabled = true

Corner Radius

Property cornerRadius for customize corner radius of controller's view. Default is 10:

transitionDelegate.cornerRadius = 10

Haptic

Property hapticMoments allow add taptic feedback for some moments. Default is .willDismissIfRelease:

transitionDelegate.hapticMoments = [.willPresent, .willDismiss]

Snapshots

The project uses a snapshot of the screen in order to avoid compatibility and customisation issues. Before controller presentation, a snapshot of the parent view is made, and size and position are changed for the snapshot. Sometimes you will need to update the screenshot of the parent view, for that use static func:

SPStorkController.updatePresentingController(modal: controller)

and pass the controller, which is modal and uses SPStorkTransitioningDelegate.

If the parent controller scrollings and you try to show SPStorkController, you will see how it froze, and in a second its final position is updated. I recommend before present SPStorkController stop scrolling force:

scrollView.setContentOffset(self.contentOffset, animated: false)

Navigation Bar

You may want to add a navigation bar to your modal controller. Since it became impossible to change or customize the native controller in swift 4 (I couldn’t even find a way to change the height of the bar), I had to recreate navigation bar from the ground up. Visually it looks real, but it doesn’t execute the necessary functions:

import UIKit
import SPFakeBar

class ModalController: UIViewController {
    
    let navBar = SPFakeBarView(style: .stork)
        
    override func viewDidLoad() {
        super.viewDidLoad()

        self.view.backgroundColor = UIColor.white

        self.navBar.titleLabel.text = "Title"
        self.navBar.leftButton.setTitle("Cancel", for: .normal)
        self.navBar.leftButton.addTarget(self, action: #selector(self.dismissAction), for: .touchUpInside)

        self.view.addSubview(self.navBar)
    }
}

You only need to add a navigation bar to the main view, it will automatically layout. Use style .stork in init of SPFakeBarView. Here is visual preview with Navigation Bar and without it:

To use it, you need to install SPFakeBar pod:

pod 'SPFakeBar'

Working with UIScrollView

If you use UIScrollView (or UITableView & UICollectionView) on controller, I recommend making it more interactive. When scrolling reaches the top position, the controller will interactively drag down, simulating a closing animation. Also available close controller by drag down on UIScrollView. To do this, set the delegate and in the function scrollViewDidScroll call:

func scrollViewDidScroll(_ scrollView: UIScrollView) {
    SPStorkController.scrollViewDidScroll(scrollView)
}

Working with UITableView & UICollectionView

Working with a collections classes is not difficult. In the Example folder you can find an implementation. However, I will give a couple of tips for making the table look better.

Firstly, if you use SPFakeBarView, don't forget to set top insets for content & scroll indicator. Also, I recommend setting bottom insets (it optional):

tableView.contentInset.top = self.navBar.height
tableView.scrollIndicatorInsets.top = self.navBar.height

Please, also use SPStorkController.scrollViewDidScroll function in scroll delegate for more interactiveness with your collection or table view.

Confirm before dismiss

For confirm closing by swipe, tap around, close button and indicator use SPStorkControllerConfirmDelegate. Implenet protocol:

@objc public protocol SPStorkControllerConfirmDelegate: class {
    
    var needConfirm: Bool { get }
    
    func confirm(_ completion: @escaping (_ isConfirmed: Bool)->())
}

and set confirmDelegate property to object, which protocol impleneted. Function confirm call if needConfirm return true. Pass isConfirmed with result. Best options use UIAlertController with .actionSheet style for confirmation.

If you use custom buttons, in the target use this code:

SPStorkController.dismissWithConfirmation(controller: self, completion: nil)

It call confirm func and check result of confirmation. See example project for more details.

Delegate

You can check events by implement SPStorkControllerDelegate and set delegate for transitionDelegate:

transitionDelegate.storkDelegate = self

Delagate has this functions:

protocol SPStorkControllerDelegate: class {
    
    optional func didDismissStorkBySwipe()
    
    optional func didDismissStorkByTap()
}

Storyboard

If need using SPStorkController with storyboard, set class SPStorkSegue for transition setting in storyboard file. I will give the class code so that you understand what it does:

import UIKit

class SPStorkSegue: UIStoryboardSegue {
    
    public var transitioningDelegate: SPStorkTransitioningDelegate?
    
    override func perform() {
        transitioningDelegate = transitioningDelegate ?? SPStorkTransitioningDelegate()
        destination.transitioningDelegate = transitioningDelegate
        destination.modalPresentationStyle = .custom
        super.perform()
    }
}

Open your storyboard, choose transition and open right menu. Open Attributes Inspector and in Class section insert SPStorkSegue.

Modal presentation of other controller

If you want to present modal controller on SPStorkController, please set:

controller.modalPresentationStyle = .custom

It’s needed for correct presentation and dismissal of all modal controllers.

Sheets in iOS 13

Apple present in WWDC 2019 new modal presentation style - Sheets. It ready use Support interactive dismiss and work with navigations bars. Available since iOS 13. I will add more information when I study this in more detail. You can see presentation here.

Other Projects

I love being helpful. Here I have provided a list of libraries that I keep up to date. For see video previews of libraries without install open opensource.ivanvorobei.by website.
I have libraries with native interface and managing permissions. Also available pack of useful extensions for boost your development process.

Russian Community

Подписывайся в телеграмм-канал, если хочешь получать уведомления о новых туториалах.
Со сложными и непонятными задачами помогут в чате.

Видео-туториалы выклыдываю на YouTube:

Tutorials on YouTube

Download Details:

Author: ivanvorobei
Source Code: https://github.com/ivanvorobei/SPStorkController 
License: MIT license

#swift #music #app #apple 

Now playing controller from Apple Music, Mail & Podcasts Apple's apps
Rupert  Beatty

Rupert Beatty

1666591500

Swift-Radio-Pro: Professional Radio Station App for iOS!

Swift Radio

Swift Radio is an open source radio station app with robust and professional features. This is a fully realized Radio App built entirely in Swift. master is now the Xcode 11.4 / Swift 5 branch.

There are over 80 different apps accepted to the app store using this code!

Swift Radio

Video

View this GETTING STARTED VIDEO. It's short & sweet to give you a quick overview.
Give it a quick watch.

Features

  • Ability to update Stations from server or locally. (Update stations anytime without resubmitting to app store!)
  • Displays Artist, Track & Album Art on Lock Screen
  • Custom views optimized for SE, 6 and 6+ for backwards compatibility
  • Compiles with Xcode 10.2 & Swift 5
  • Parses JSON using Swift Codable protocol
  • Background audio performance
  • Search Bar that can be turned on or off to search stations
  • Supports local or hosted station images
  • "About" screen with ability to send email & visit website
  • Pull to Refresh stations
  • Uses the AVPlayer wrapper library FRadioPlayer:
    • Automatically download Album Art from iTunes API
    • Parses metadata from streams (Track & Artist information)
  • Uses Spring library:
    • Animate UI components
    • Download and cache images using ImageLoader class

Important Notes

  • 4.10.19: master/carplay/dev branches migrated to Xcode 11.4/Swift 5 by @fethica.
  • 8.20.19: Add watermarked image for share activity by @CamMcLeod.
  • 5.18.19: master branch migrated to Xcode 10.2/Swift 5 by @fethica.
  • 9.4.19: Add AirPlay support by @geraldnolan.
  • 2.10.19: Add CarPlay support by @fethica -- Announcement. Branch here: carplay branch.
  • 1.30.19: Add iPad support by @misteral.
  • 1.9.19: master branch migrated to Xcode 10/Swift 4.2 by @fethica.
  • 1.21.18 Update: Swift Radio App gets a major update with Version 2 by @fethica -- Release Note.
  • 10.6.17 Update: The AVPlayer branch migrated to Xcode 9/Swift 4 by @joemcmahon. Branch here: AVPlayer Branch
  • 10.1.17 Update: Master branch migrated to Xcode 9/Swift 4 by @fethica.
  • 12.26.16 Update: The AVPlayer branch has been updated to Swift 3 by @giacmarangoni. Branch here: Xcode8/AVPlayer Branch
  • 9.20.16 Update: Master branch migrated to Xcode 8/Swift 3 by @fethica. Big thanks to him!
  • 7.26.16 Update: AVPlayer development branch added, thanks @kusikusa. Plus, this branch includes the Spotify API for downloading artwork: AVPlayer/Spotify Branch
  • 6.5.16 Update: Bluetooth streaming added, thanks @fethica
  • 3.27.16 Update: Google handoff added, thanks @GraemeHarrison
  • 2.24.16 Update: Share icon added, thanks @SuperChloe.
  • 12.30.15 Update: UISearchBar added, thanks @fethica. Turn it on/off in the "SwiftRadio-Settings" file.
  • 12.14.15 Update: LastFM has reopened their API signups. Get one at last.fm/api.
  • 10.21.15 Update: Added option to use iTunes API to download album art. (See FAQ below). iTunes art is 100px x 100px. i.e. It is smaller than LastFM artwork. So, if you use this API instead, you will want to adjust the UI of your app.
  • Volume slider works great in devices, not simulator. This is an Xcode simulator issue.
  • Radio stations in demo are for demonstration purposes only.
  • For a production product, you may want to swap out the MPMoviePlayerController for a more robust streaming library/SDK (with stream stitching, interruption handling, etc).
  • Uses Meng To's Spring library for animation, making it easy experiment with different UI/UX animations
  • SwiftyJSON & Spring are included in the repo to get you up & running quickly. It's on the roadmap to utilize CocoaPods in the future.

Credits

Requirements

  • Xcode 10.2
  • Know a little bit of how to program in Swift with the iOS SDK

Please note: I am unable to offer any free support or modifications. Thanks!

Creating an App

If you create an app with the code, or interesting project inspired by the code, shoot me an email. I love hearing about your projects!

This is just a basic template. You may use it as a clean starting point to add other features.

Some of the things I've built into this Radio code for clients include: Facebook login, Profiles, Saving Favorite Tracks, Playlists, Genres, Spotify integration, Enhanced Streaming, Tempo Analyzing, etc. There's almost unlimited things you can use this code as a starting place for. I keep this repo lightweight. That way you can customize it easily.

Setup

The "SwiftRadio-Settings.swift" file contains some project settings to get you started. Watch this Getting Started Video to get up & running quickly.

Integration

Includes full Xcode Project to jumpstart development.

Stations

Includes an example "stations.json" file. You may upload the JSON file to a server, so that you can update the stations in the app without resubmitting to the app store. The following fields are supported in the app:

name: The name of the station as you want it displayed (e.g. "Sub Pop Radio")

streamURL: The url of the actual stream

imageURL: Station image url. Station images in demo are 350x206. Image can be local or hosted. Leave out the "http" to use a local image (You can use either: "station-subpop" or "http://myurl.com/images/station-subpop.jpg")

desc: Short 2 or 3 word description of the station as you want it displayed (e.g. "Outlaw Country")

longDesc: Long description of the station to be used on the "info screen". This is optional.

Contributions

Contributions are very welcome. Please check out the dev branch, create a separate branch (e.g. features/3dtouch). Please do not commit on master.

FAQ

Q: Do I have to pay you anything if I make an app with this code?
A: Nope. This is completely open source, you can do whatever you want with it. It's usually cool to thank the project if you use the code. Go build stuff. Enjoy.

Q: How do I make my app support ipv6 networks?
A: For an app to be accepted by Apple to the app store as of June 1, 2016, you CAN NOT use number IP addresses. i.e. You must use something like "http://mystream.com/rock" instead of "http://44.120.33.55/" for your station stream URLs.

Q: Is there an example of using this with the Spotify API?
A: Yes, there is a branch here that uses it here (⚠️ deprecated).

Q: Is there another API to get album/track information besides LastFM, Spotify, and iTunes?
A: Rovi has a pretty sweet music API. The Echo Nest has all kinds of APIs that are fun to play with.

Q: I updated the album art size in the Storyboard, and now the sizing is acting funny?
A: There is an albumArt constraint modified in the code. See the "optimizeForDeviceSize()" method in the NowPlayingVC.

Q: My radio station isn't playing?
A: Paste your stream URL into a browser to see if it will play there. The stream may be offline or have a weak connection.

Q: Can you help me add a feature? Can you help me understand the code? Can you help with a problem I'm having?
A: While I have a full-time job and other project obligations, I'd highly recommend you find a developer or mentor in your area to help. The code is well-documented and most developers should be able to help you rather quickly. While I am sometimes available for paid freelance work, see below in the readme, I am not able to provide any free support or modifications. Thank you for understanding!

Q: The song names aren't appearing for my station?
A: Check with your stream provider to make sure they are sending Metadata properly. If a station sends data in a unique way, you can modify the way the app parses the metadata, in the RadioPlayer class implement FRadioPlayerDelegate method: radioPlayer(_ player: FRadioPlayer, metadataDidChange rawValue: String?).

Get Single Station Code

If you'd like to support this project, co-organizer Fethi has created a well-architected single station version of this code. It's a super great bargain: The developers behind this project typically charge up to $200/hr for freelance work, but this fully working code is only $50. No extra fees.

You can PayPal: fethica@me.com or use this link: Paypal Me We will send you the code after 24 hours with setup instructions. All funds go to support the project.

Need something more advanced? We have recent experience building iOS apps for high-profile brands. Send a friendly email to Matthew or Fethi.

RadioKit SDK Example

  • You can use this Swift code as a front-end for a more robust streaming backend.
  • Brian Stormont, creator of RadioKit, has created a branch with the professional RadioKit SDK already integrated. Plus, his branch adds rewind & fast forward stream playback. This is an excellent learning tool for those who are interested in seeing how a streaming library integrates with Swift Radio Pro. View the branch here.

Download Details:

Author: Analogcode
Source Code: https://github.com/analogcode/Swift-Radio-Pro 
License: MIT license

#swift #audio #radio #music 

Swift-Radio-Pro: Professional Radio Station App for iOS!
Rupert  Beatty

Rupert Beatty

1665712500

Aural-player: An Audio Player for MacOS, inspired By Winamp

Aural-player

An Audio Player for MacOS, inspired By Winamp

Overview

Aural Player is an audio player for macOS. Inspired by the classic Winamp player for Windows, it is designed to be easy to use and customizable, with support for a wide variety of popular audio formats and powerful sound tuning capabilities.

Flexible UIPersonalization
With Winamp-like modularity and multiple app presentation modes, you can lay out the app to suit your workspace, reduce it to a tiny widget, or tuck it away in the macOS menu bar.Personalize Aural Player with exactly the colors and fonts that define your creative tastes.
Extensive audio formats supportSound tuning and monitoring
By harnessing the power of FFmpeg, Aural Player supports a wide variety of popular audio formats, in addition to all macOS Core Audio formats.With several built-in effects and support for Audio Unit (AU) plug-ins, sound tuning and monitoring possibilities are endless.

How it works (under the hood)

Aural Player uses AVFoundation's AVAudioEngine framework (and some low-level Core Audio) for playback, effects, and visualization, and uses FFmpeg libraries to decode formats not native to macOS.

The UI is built on top of AppKit with views defined in XIBs (no SwiftUI).

The code is written entirely in Swift (approximately 100,000 lines of code).

How it works screenshot

Read more about it here.

Limitations

  • Currently, Aural does not play online streams. However, this feature has been requested and I am strongly considering implementing it for version 4.x.
  • Aural does not play protected content (for example, Apple's M4P or Audible's AAX). There are no plans to implement this.

Key features

(Comprehensive feature list here)

  • Supports all Core Audio formats and several non-native formats: FLAC, Vorbis, Monkey's Audio (APE), Opus, & many more
  • Supports M3U / M3U8 playlists
  • Playback: Bookmarking, segment looping, custom seek intervals, per-track last position memory, chapters support, autoplay, resume last played track.
  • Effects: Built-in effects (incl. equalizer), Audio Unit (AU) plug-in support, built-in / custom presets, per-track settings memory.
  • Playlist: Grouping by artist/album/genre, searching, sorting, type selection.
  • Track information: ID3, iTunes, WMA, Vorbis Comment, ApeV2, etc. Cover art (with MusicBrainz lookups), lyrics, file system and audio data. Option to export.
  • Track lists: Favorites list, recently added and recently played lists.
  • Visualizer: 3 different visualizations that dance to the music, with customizable colors.
  • UI: Modular interface, fully customizable fonts and colors (with gradients), built-in / custom window layouts, configurable window snapping / docking / spacing / corner radius, menu bar mode, control bar (widget) mode.
  • Usability: Configurable media keys support, swipe/scroll gesture recognition, remote control from Control Center, headphones, and media control devices / apps.

Roadmap

Version 4.0

As of May 21, 2022, version 4.0 is in active development, and may bring several improvements.

Interested in seeing what's going on with the development of v4.0 ? Check out the v4.0 branch!


In addition to v4.0, the following features may be implemented in the future:

  • Replay gain.
  • Crossfading between tracks.
  • Gapless playback.

Other goals

  • More extensive unit testing.
  • More comprehensive documentation.
  • Better source code commenting.

Download

Latest release

See all releases

Compatibility

This table lists the minimum required Aural Player version for your hardware and macOS version. It is always recommended to use the latest app version, regardless of your hardware / macOS version.

 Intel (x86_64)Apple silicon (arm64)
macOS 10.12 - 10.151.0.0(N/A)
macOS 11.x (Big Sur)2.3.03.0.0
macOS 12.x (Monterey)2.3.03.0.0

NOTES:

Version 3.0.0 and all subsequent releases are universal binaries, i.e. capable of running on both Intel and Apple Silicon Macs.

Due to limited time, I can only officially support macOS Big Sur and Monterey going forward. The app should still work on older systems (going back to Sierra), but I can no longer make guarantees or troubleshoot issues on older systems.

Installation

  1. Mount the AuralPlayer-x.y.z.dmg image file.
  2. From within the mounted image, copy Aural.app to your local drive (e.g. Applications folder).
  3. Run the copy from your local drive. You will likely see a security warning and the app will not open because the app's developer is not recognized by macOS.
  4. Go to System Preferences > Security & Privacy > General > Open anyway, to allow Aural.app to open.

NOTE - Please don't run the app directly from within the image. Copy it outside and run the copy.

Media keys support

Your Mac media keys should work with Aural right out of the box (assuming you granted Aural Accessibility permissions on first app launch), but if for some reason the media keys don't work, follow the steps listed here.

Building the app

All you need is Xcode 12.2+ and the source code (a working knowledge of Swift would help !). It is recommended to use the source code from the latest release (as opposed to the master branch) as code between releases can be buggy / unstable.

Read the quick start guide for more details.

Documentation

All the documentation can be found on the wiki.

Some pages to get you started

How To's

Handy keyboard shortcuts

Building and running Aural Player (quick start guide)

Developer reference

Screenshots

Default window layout

Vertical full stack window layout screenshot

Expanded Art player view

Expanded Art player view demo

Hosting Audio Units (AU) plug-in "TDR Nova" Equalizer by Tokyo Dawn Labs

Audio Units demo GIF

Running in Menu Bar mode

Menu Bar Player screenshot

Running in Control Bar mode

Control Bar Player screenshot

Control Center integration (macOS Big Sur)

Control Center integration 1 screenshot

Control Center integration 2 screenshot

Font schemes

Font schemes demo

Color schemes

Color schemes demo

Customizing the player view

Player view

Customizing the window corner radius (up to 25px)

Window corner radius demo

Enabling and disabling effects

Enabling and disabling effects demo

Segment loop playback

Segment loop playback demo

Detailed track info

Detailed track info

Changing the window layout

Changing the window layout demo

Visualizer

Visualizer.gif

Known issues (and solutions)

The text is too small on my Mac screen.

Poor audio quality when using Bluetooth headsets.

My media keys don't work with Aural Player

Contact and conversation

Email: kartikv2017@gmail.com

GitHub Issues https://github.com/kartik-venugopal/aural-player/issues.

The app is what it is today largely thanks to the numerous bug reports and valuable feedback of users over the years. I urge you to file issues for any bugs you encounter or for features / behavior you would like to see implemented. I am generally pretty good at responding to issues, and at the very least, I will read, contemplate, and respond.

How to contribute

Interested in contributing to this awesome project ?!

I would love to localize Aural Player so that it is more comfortable to use for users who prefer other languages. I could definitely use help translating Aural Player's text into languages such as German, French, Spanish, Italian, Chinese, Japanese, etc (and any others that you can help with).

Please email me if you're interested in helping with this !

NOTE - I am not looking for help with app development at the moment, but if this changes, I will post an update.

Third party code attributions

  • FFmpeg (used to decode audio formats not natively supported on macOS)
  • MediaKeyTap (used to respond to media keys)
  • RangeSlider (used in the Filter effects unit to specify frequency ranges)

Contributor attributions

App user yougotwill made numerous suggestions for improvements and features, provided a lot of valuable feedback, and designed the Poolside.fm theme.

Fellow GitHub member dun198 made significant contributions towards this project - performance optimizations, UX improvements, etc.

I am also hugely grateful to all the app users who have filed bug reports and feature requests, and provided valuable feedback.

Watch out for v4.0 - an improved app version, expected to come out later this year ! Read about it here.

Download Details:

Author: Kartik-venugopal
Source Code: https://github.com/kartik-venugopal/aural-player 
License: MIT license

#swift #audio #music #macos 

Aural-player: An Audio Player for MacOS, inspired By Winamp

MIDI.jl: A Julia Library for Handling MIDI Files

MIDI.jl

MIDI.jl is a complete Julia package for reading and writing MIDI data. Besides fundamentally basic types, like MIDITrack or MetaEvent, we have a robust type that describes a music note.

Installation

To install the latest stable release, use ]add MIDI. To install the development version, use ]dev MIDI.

Documentation

For usage examples, documentation, contact info and everything else relevant with how MIDI works please visit the official documentation page: https://juliamusic.github.io/JuliaMusic_documentation.jl/latest/.

Other

For the release history see the CHANGELOG file. For the contributor guide see CONTRIBUTING. For the code of conduit see COC.

Citing

If you used MIDI.jl or MusicManipulations.jl in research that resulted in publication, then please cite our paper using the following BibTeX entry:

@article{Datseris2019,
  doi = {10.21105/joss.01166},
  url = {https://doi.org/10.21105/joss.01166},
  year  = {2019},
  month = {mar},
  publisher = {The Open Journal},
  volume = {4},
  number = {35},
  pages = {1166},
  author = {George Datseris and Joel Hobson},
  title = {{MIDI}.jl: Simple and intuitive handling of MIDI data.},
  journal = {The Journal of Open Source Software}
}

Download Details:

Author: JuliaMusic
Source Code: https://github.com/JuliaMusic/MIDI.jl 
License: MIT license

#julia #music #audio #interface 

MIDI.jl: A Julia Library for Handling MIDI Files