 |
| Author |
|
Angelus
Psycler

Date Registered: 09.2002
Location: Santiago> Galicia> Spain> Europe> Earth
Posts: 349
 |
|
| Learning C++ using Psycle sources |  |
To learn some C/C++ coding is one of the goals of my TODO list (just to know the basics). So after reading some books for beginners about this, I decided to look into the source code of apps that I know very well as a practical exercice. I'll start to look into the source code of Psycle plugins, as they are coded using standard dependencies in C++ (aren't they?). So these are my questions:
1st) I was working mainly using Borland C++BuilderX to learn. Is it possible to use this IDE to work with and compile the source code of plugins? If it isn't, Is it possible to use the Express version (free) of MSVC?
2nd) Maybe (one day) I'll try to look into the main application (Psycle MFC) . I know that Express edition of MSVC doesn't ships with MFC/NET libraries. So to compile Psycle, is it mandatory to work with commercial versions of MSVC (Standard/Pro)?
Thanks in advance.
PS: Sorry if this questions were discussed previously, but I couldn't find anything useful through the forums.
__________________ ?( :( :) :] :D .cC( Psycle! )
|
|
15.08.2010, 17:26 |
|
[JAZ]
Psycle Developer

Date Registered: 11.2001
Location: Balaguer (Spain)
Posts: 1238
![[JAZ] ist offline](images/offline.gif) |
|
| |  |
Hello Angelus.
Starting with the plugins is a wise idea. They are indeed classes in C++, which extend a common interface.
While it may be possible to compile psycle plugins with borland, the fact that the plugins export an instance of the class and that the interface was initially defined with Visual Studio makes it possible that there are compatibility problems if built with other platforms (I don't want to confuse you, but it has to do with fastcall and stdcall, and the fact that c++ compilers name class methods differently).
About using the express edition of visual studio, then yes. This is possible. The only problem is that the solution file may not load properly without modification in that version (something about the layout of the solution itself), but should be quite easy to create one for the express edition.
For Psycle itself, I don't know a way of using the express edition for the main program (yes, MFC dependencies) and there are no plans yet on changing that.
If psycle-core had worked as expected and we had the graphical side better structured (as it has been tried on trunk), then it could be feasible redoing it in .NET (just the GUI).
Yet, that would take some dedication.
I recommend you to contact me by messenger to get all that working.
__________________ <[JAZ]> Pa pi pa pa pa pi pa.... ;·D
|
|
16.08.2010, 00:12 |
|
shadowbane
Psycler

Date Registered: 07.2007
Location: here
Posts: 242
 |
|
|
I am curious about "If psycle-core had worked as expected..." Does this mean that something about psycle-core was fundementally flawed and we won't be seeing a new psycle using it in the future?
__________________ the shadow runs form the light, but can never be fully driven back.
|
|
16.08.2010, 04:10 |
|
[JAZ]
Psycle Developer

Date Registered: 11.2001
Location: Balaguer (Spain)
Posts: 1238
![[JAZ] ist offline](images/offline.gif) |
|
| |  |
Short answer: Maybe.
Longer answer:
psycle-core was born from the first linux fork. Initially it was the minimal code that made a linux small application open a .psy file and try to play it.
Since the linux fork opened a path for rethinking Psycle and improve on several limitations, part of the engine was completely redone with focus in multi-pattern playback, and dynamic-column tracks:
psycle-core (and qpsycle) has a sequencer that can play more than one pattern at the same time, play only one portion of the pattern ( i.e. play just beats 2 and 3 of a 4 beat pattern), define pattern tracks with volume column and two or more effect columns, and more.
As the time progressed, it also saw other important improvements like separating the audiodrivers in its own folder, helper libraries, the loaders (the different .psy formats) into separated files, better management/abstraction of the different type of machines (internal, native, vst and ladspa) and several other features that make it better from the conceptual point of view, but not really compatible with Psycle as it is now.
(several global commands don't have the same meaning or are easy to implement, like the tweak slide, or jump to sequence position. Also, MIDI was never integrated)
It is important to say that the code isn't lost or a dead cause. Many of the changes made in psycle-core have been ported back to Psycle. (from improvements in things like connecting a machine to another, to fixes/improvements in the way the loaders work, to the last one that is comming with the new beta: multithreading playback).
The truth is that many songs (old and new) can be played in psycle-core with no difference to how it is played with Psycle, but the remaining may be difficult to get as it is.
Probably, the next best thing that could be made is now, with the experience that we've got with psycle-core, to modularize the current psycle engine in a similar way to how we did psycle-core and forget about multisequence until we are really ready for it.
(I am already using the latest universalis and psycle-helpers that psycle-core use for the upcoming beta. Next would be using the audiodrivers).
Definitely, the reason why Psycle development has gone as slow in the last half of this decade is because of scrapping what was done and going back to stage 1 too many times (there have been three different 1.9 versions!
You know.. I'm tempted to skip the number completely... ).
Yet, I am really happy to see how, even with those problems, Psycle has evolved.
__________________ <[JAZ]> Pa pi pa pa pa pi pa.... ;·D
|
|
16.08.2010, 19:23 |
|
Angelus
Psycler

Date Registered: 09.2002
Location: Santiago> Galicia> Spain> Europe> Earth
Posts: 349
 |
|
|
Thanks a lot for the info and your offering, JAZ. I'll download and try with MSVC express edition.
__________________ ?( :( :) :] :D .cC( Psycle! )
|
|
22.08.2010, 22:27 |
|
Angelus
Psycler

Date Registered: 09.2002
Location: Santiago> Galicia> Spain> Europe> Earth
Posts: 349
 |
|
| |  |
First, sorry for recovering this old post but I've preferred to follow its thread.
I've taken up again my learning on C++ and I've tried to compile the plugin alk-muter (I think this is the simplest of all) in MSVC 2005 Express with the provided solution. I already know your offering to contact you by messenger, but I think it's better to keep this open to everyone that will want to work with plugins on MSVC Express editions, aren't you? 
I want to download only the necessary sources to compile the plugins, so what I've already got is:
quote: |___psycle/
:::::|___trunk/
::::::::::|___build-systems/
::::::::::|___diversalis/
::::::::::|___psycle-plugins/
::::::::::|___universalis/
I've loaded the solution ''alk-muter.msvc-2005.vcproj'' into MSVC, and I've tried to build psycle-plugins/alk-muter. But I get one error because it needs the header file 'boost/detail/endian.hpp'. You can take a look into the complete build log in THIS LINK.
I've browsed the repository and have not found this header file. Where can I find it?
Thanks in advance for you help.
__________________ ?( :( :) :] :D .cC( Psycle! )
|
|
16.09.2012, 12:47 |
|
[JAZ]
Psycle Developer

Date Registered: 11.2001
Location: Balaguer (Spain)
Posts: 1238
![[JAZ] ist offline](images/offline.gif) |
|
| |  |
Hello angelus.
the vcproj file is not the solution, it is the project.
The solution is placed in the build-systems/msvc/ directory and named solution-msvc-2005.sln ( I think the 2005 one is still in the head. Else, you might want to get the one from the tag 1.8.6.1 )
You might also need to get the external-packages directory from the SVN. There is where the boost libraries are placed (as a .tar.gz file, which, if you have 7-zip installed, will get automatically unzipped and placed in the correct directory when building).
A couple of plugins will also need the psycle-helpers (there's one thing about maths and denormals, plus the resampling).
Now, why is all these necessary?
universalis depends on boost libraries, and universalis and diversalis allow to take care of several platform and compiler dependant things, to ease the development.
Plugins don't necesarily use universalis, but all the projects are made to depend on universalis to be able to use it, if needed.
Also, in order to avoid parsing the boost headers for each and every plugin, a common "precompiled headers" project exists on which the plugins depend.
So the build order becomes:
boost (uncompressing and placing in correct place. Done just once)
precompiled-headers
universalis (diversalis are just headers, so they are not compiled)
psycle-helpers (if needed)
plugin
One could create a new Dll project without depending on all these things, and just use the psycle-plugins/src/psycle/plugin_interface.hpp . This header is intentionally free of all said above.
__________________ <[JAZ]> Pa pi pa pa pa pi pa.... ;·D
|
|
16.09.2012, 13:05 |
|
Angelus
Psycler

Date Registered: 09.2002
Location: Santiago> Galicia> Spain> Europe> Earth
Posts: 349
 |
|
|
Josep: Thanks for your fast reply.
I've been able to compile alk-muter plugin using MSVC 2005 Express. The key is that it's not an app, but a DLL so I MUST to specify the /NOENTRY linker option in the project properties.
I've just compiled a translated-into-spanish version of alk's plugin. If you want to test it, you can download it from THIS LINK. 
I hope this will be helpful to others.
__________________ ?( :( :) :] :D .cC( Psycle! )
|
|
16.09.2012, 15:50 |
|
|
|
 |
|