Programmatically generate MIDI and play with VST instrument/effects to wav file? - wav

What web language/framework would you recommend to accomplish the following:
Programmatically create basic MIDI files from scratch, such as melodies, scales, and chords.
Programmatically play those MIDI files using a VST
instrument to a .wav output file (such as a Grand Piano VST
instrument).
It would also be very nice to use other VST effects and
processors along with the VST instrument, such as reverbs and
compression to make it sound professional.
I'd like to do this all dynamically in a web program, so that no GUIs are needed for the VST instruments/effects.
Ideally it would look like this:
Program creates MIDI file based on user input > MIDI file is played by VST instrument > VST effects & processors are applied > Output .wav file
This will be a proof-of-concept for a more adventurous program.
Many thanks in advance!

VST.NET for 2.x VST plugins (and hosts) in C# or VB.NET
MIDI.NET for Windows MIDI support in C# or VB.NET
And in my repository project there is generic code to work with WAV files (.NET)
Should be pretty quick to get going.
[2c]

Related

How to create and modify .doc and .docx file in Qt?

I want to create and modify .doc and .docx file in Qt creator with ability to compile for Windows, Linux, Android and IOS.
This is not a Qt-specific question imho. Anyhow here is my answer:
Quoting wikipedia:
is a zipped, XML-based file format
What this means is you need to decompress (you need to figure out how it is compressed to begin with) and process the XML for doc files. Qt provides basic (de)compression facilities and does provide the tools to process XML data.
In terms of Qt Creator - you have to write your own plugin for that purpose. You can check what's already there - processing of CMake, C++, C, Python files.
You should use what's already there. LibreOffice for example, which is open source and free, can handle such documents (incl. doc). There are libraries that do that too. So your best bet is to integrate some library into your Qt application. I would NOT recommend implementing it yourself unless you have a lot of spare time. The fact that big projects such as LibreOffice, OpenOffice etc. still don't have 100% support for such documents should give a big enough hint that it's not a trivial task.

how to use selected arduino libraries?

I would like to know if it is possible to use selective arduino libraries in our AVR projects. For Example: I am using Atmega328 and Atmel studio. I would like to use DS1307 related library file(twi.c and Wire.c source files I guess) in my project. Can we use individual libraries and then include applicable header files in our build? If so where are these libraries located and what is the extension? I saw few articles on building entire arduino project in Atmel studio and I am not interested in that. I want to manage without installing arduino if possible (I can install arduino only to get library if needed). I thought of including source files, but they are in C++ and I started getting error messages when included in C project. Is it possible to do without modifying the source files much?
After searching, i found that
Any 5V microcontroller with I2C built-in can easily use the DS1307.
check also first lines here.
I look quickly at DS1307.c and found it is not using any functions from wire.c
But instead of all that you could get source code for DS1307.c and implement any function begin with i2c by yourself and small modifications for interrupt functions. and you can use it in your code. i downloaded the library from this link.
There are a lot of twi/i2c libraries for avr, you could download most suitable one and rename it's function like the function called from DS1307.c

How to get the epub from an acsm file?

I want to write a small linux tool that automates the download of eBooks. From my online library I can download an ACSM file. Now I need a step to automatically download the epub file. From what I've read this step is called fulfilment. The tool shall run on a headless server.
Right now I'm scripting wine and Adobe Digital Editions. But that is quite ugly and requires a graphical user interface. While this works fine on my PC, it doesn't work on a headless server.
Does anyone know a library that I could use?
Or a documentation of the fulfilment process so I could implement my own library?
In "PDF -Adobe Digital Edition" I saw a reference to the ADE_LauncherSDK_DevNet.pdf but I do not understand how to use this in an application.
Notes:
I do not want to remove the DRM, I just want to get the epub file.
The tool will be open source, so I do not want to buy anything from Adobe.
I know it's a 9 years old question but because I ended up on it with the exact same question, I wanted to give an answer.
Indeed, the code to download an epub/pdf from an acsm file can be found in 2 projects.
libgourou is a free implementation of Adobe's ADEPT protocol used to
add DRM on ePub/PDF files. It overcome the lacks of Adobe support for
Linux platforms.
https://indefero.soutade.fr//p/libgourou/
There is a docker version: https://github.com/bcliang/docker-libgourou/
Calibre ACSM Input plugin
This is a Calibre plugin that allows you to
turn ACSM files into EPUB or PDF files without the need for Adobe
Digital Editions. It is a full Python reimplementation of libgourou by
Grégory Soutadé (http://indefero.soutade.fr/p/libgourou/), and has
since been extended by more and more features.
https://github.com/Leseratte10/acsm-calibre-plugin
Calibre has a command line interface: https://manual.calibre-ebook.com/generated/en/cli-index.html

Add mp3 codec to qt-project

I am really new to Qt development as well as audio codecs. I recently found a way to play mp3 sound using QSound. I want to play it in my qt project using QAudioOutput, but there is no mp3 codec in QAudioDeviceInfo::supportedCodecs().
I tried install mp3 codec but it is still not listed in QAudioDeviceInfo::supportedCodecs(). How can I add a codec to QAudioDeviceInfo::supportedCodecs()?
By definition QAudioDeviceInfo provides an interface to query audio devices and their functionality. Which means any codec returned by QAudioDeviceInfo::supportedCodecs() is a codec format the device is able to play directly, and will be probably be raw audio format like pcm. On the other hand mp3 need to go through a software decoder first, so It will not be in this list.
Take a look at the Media Player example for a reference. It should be able to play mp3 and other formats. The project should be available in the Qt source or installation directory in your machine, either under the folder demo or examples.
It seems from the source that it does lot more than just barely playing audio. So focus on the constructor of the class Player as well as the method Player::addToPlaylist()
ps :I speak in conditional tense because I am more familiar with Qt 4 than Qt 5.
EDIT:
As long as windows media player cannot play mp3, you will not have full mp3 support in your Qt app, and the Player example I gave you will not work either. Download some codecs in your system till Windows media player can play mp3.

Library to compress a file as a.qzip

I have some files whose extension is qzip, for example a.qzip.
It seems that those files are compressed with a library of qt.
Could anyone tell me what it is?
Thankyou very much.
According to this FAQ page:
Qt uses the zlib library to provide compression. This means that you can compress and decompress your bytearrays of data using Qt. [...]
Note that this does not produce file archives that can be opened by other applications, to do that you will need to write it yourself using Qt’s custom file handling system or use a 3rd party library.
Which if someone (lazily) created a file using qCompress() you would need to write your own code to read the file as a QByteArray then use the corresponding qUncompress() method to read it. There is no official qzip format related to Qt that I know, so you should probably go and slap the developer who made these files if it works out!
In general, if you want to compress data that will be reusable, use a common file format.
This was the only reference I have found on the entire www over qzip.
quicklz

Resources